PropBasic Libraries to support the Badge WX (#20300)

BeanBean Posts: 7,960
The Parallax Badge WX (#20300) represent a great value at only $50. https://www.parallax.com/product/20300
I plan to create a set of library functions to allow PropBasic programmers to use it.
This is a fairly large project and will take many hours of my time. I hope others will benefit from it.

The first step is to install the latest version of SimpleIDE (version 1.1.2) you can download here https://learn.parallax.com/tutorials/language/propeller-c/propeller-c-set-simpleide

Then download the attached file "PropBasic for SimpleIDE.Zip" and extract the files. Read the "Setup SimpleIDE for PropBasic.pdf" it will explain the steps required. If you make a new project you MUST change the compiler from "C" to "SPIN" in the project options.

Make sure your computer and the Badge WX are connected to the same WiFi router. When you click on the dropdown in the upper right of the SimpleIDE screen, it should fine the Badge WX (it wil be WX-xxxx). After the Badge WX connects YOU MUST PRESS THE POWER BUTTON 6 TIMES REALLY FAST. This will unlock the badge so it will accept new programs.

Now download the pongdemo.zip and extract the files. Load the "BadgeWX.side" project into simpleide. Press the "Load RAM and run" button and the program should download to the badge and start running.

The file PropBasic for Badge WX.zip contains the libraries version 0.1beta. There is a demo program "Demo1" that demonstrates them.

Bean

Comments

  • 25 Comments sorted by Date Added Votes
  • BeanBean Posts: 7,960
    edited September 10 Vote Up0Vote Down
    Sept 10, 2018
    I have ordered my Badge WX but is hasn't arrived yet.
    In the meantime I am planning out the libraries and create the SUBs and FUNCs that I think I will need.
    As soon as I can test the most basic libraries I will post them.

    First order of business: LEDs and Buttons.

    Bean
  • This is great news Bean.

  • Hey Bean,

    Shame on me for not having explored this but my needs are quite simple (real-time, determinism, etc.):

    Being able to interface with existing PASM objects would open up all kinds of possibilities for PropBasic.
    Failure is not an option...it's bundled with the software.
  • BeanBean Posts: 7,960
    edited September 10 Vote Up0Vote Down
    Mickster,
    Most PASM drivers can be enclosed in ASM...ENDASM and converted pretty easy.
    It is the .spin files that are much harder as PropBasic cannot call .spin code.
    Either way, you are much better off re-writing as a library because it will (if written properly) remove dead code from the library.

    There are a couple libraries on OBEX for PropBasic (TV, VGA2, VGA4) that you can look at to get an idea how they work.

    Bean
  • Thank you a bunch, Terry. We published only BlocklyProp examples because this is the easiest way for non-programmers to get a badge running. But we realize that there's a whole lair of developers, hackers, and experimenters that want to program in Spin or C. We are thankful for your contribution. When you're ready, let me know and I'll put any archives on the product page for download.

    - Ken

  • Bean
    Sure is good to see that you are finding the time for, Propbasic. I have used Propbasic whenever I have a something for the P1, and since it was released.

    I was just looking at Johnathan Dummer's SD code and thinking about porting it across to Propbasic when I
    came across this thread. On the other hand it might be better to look at extending your despatcher code, and provide examples so that folks could utilise some of the objects in the OBEX. Time to do this stuff is always a problem.

    BTW I have posted to earlier Propbasic threads under my old username Ron Sutcliffe, but when I upgraded my system here
    I decided the change a few things.

    Ron

    Manche, France
  • rsut wrote: »
    Bean
    Sure is good to see that you are finding the time for, Propbasic. I have used Propbasic whenever I have a something for the P1, and since it was released.

    I was just looking at Johnathan Dummer's SD code and thinking about porting it across to Propbasic when I
    came across this thread. On the other hand it might be better to look at extending your despatcher code, and provide examples so that folks could utilise some of the objects in the OBEX. Time to do this stuff is always a problem.

    BTW I have posted to earlier Propbasic threads under my old username Ron Sutcliffe, but when I upgraded my system here
    I decided the change a few things.

    Ron

    Manche, France

    Coincidentally, this very SD driver is what just prompted my question to Bean.
    It's a bit hazy now but I remember a thread about trying to use PropBasic with an SD card and I wondered why not use one of the existing objects.
    Failure is not an option...it's bundled with the software.
  • Your on-going selfless contributions are sincerely appreciated, and your timing is always impeccable!

    I was just kicking around the idea of playing with PropBASIC libraries. When work travel offers small gifts of time (i.e. flight delays), this seems like a better use of time than the alternatives (staring at the news or drinking more beer ... mmm). I just installed the Propeller IDE on my work laptop and moved some files into the cloud. My return trip on Thursday connects in Charlotte, so I may be gifted with lots of time thanks to Florence.
  • I suspect the SD card is going to be the hardest library to write.
    Seems they are really picky, and some cards act differently so it is a challenge.
    But I really should have written it a long time ago, I just never needed SD support for my projects.
    I was going to start with Kye's SD card drive, but maybe I'll look at Mr. Dummer's code too.

    Bean
  • In my collection of PropBASIC libraries, I have this SD variation ... https://forums.parallax.com/discussion/122615/propbasic-sd-card/p1

    Ironically, I also have not had a need, yet included it on my prototyping PCB just in case. I have not even tested the one linked above years later.
  • Great news, Bean!
    Whit+

    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • After updating SimpleIDE to the latest version, programming the Badge WX over WiFi is a piece of cake.

    Pressing the power-button 6 times to lock programming works great.

    I already have the LED and Button libraries working.
    When I get a little further along I will start posting the Library files.

    I'd like to hear from some users that have a Badge WX that would be interested in Beta Testing.
    Let me know in this thread.

    Bean
  • I have posted a little pong demo program using the first three libraries in the first post.

    It has the libraries for the OLED, Buttons, and Audio

    Bean
  • Bean wrote: »
    I have posted a little pong demo program using the first three libraries in the first post.

    It has the libraries for the OLED, Buttons, and Audio

    Bean

    I can not find any attachments in the first post.
    Infernal Machine
  • Publison, Hmmm that's weird. It shows up for me. It is pongdemo.zip file. It is below all my signature stuff.

    Bean
  • Publison wrote: »
    I can not find any attachments in the first post.

    Strange, appear here as these 2 links in first post
    http://forums.parallax.com/discussion/download/123623/PongDemo.zip
    http://forums.parallax.com/discussion/download/123657/PropBasic for SimpleIDE.zip

  • PublisonPublison Posts: 10,399
    edited September 21 Vote Up0Vote Down
    Bean wrote: »
    Publison, Hmmm that's weird. It shows up for me. It is pongdemo.zip file. It is below all my signature stuff.

    Bean

    It's REALLEY strange because I don't see your Sig any more on this 'puter, (Chrome). I know what it used to look like.
    Infernal Machine
  • I remove my signature because I thought that was preventing you from seeing the attachments.

    Bean
  • I can see them now!
    Infernal Machine
  • I have posted version 0.1beta of the libraries.
    The file is in the first post as "PropBasic for Badge WX.zip" and it contains a demo program "Demo1" that shows the use of all of the libraries.

    I hope you will see from the demo how easy it is to use the badge with PropBasic.

    Comment and questions welcome...

    Bean
  • I have updated the libraries.

    I have added support for TV output (monochrome 256x192 pixels), and large characters on the OLED.

    Bean
  • PublisonPublison Posts: 10,399
    edited October 8 Vote Up0Vote Down
    Just tried Pong Demo. Had a small problem with missing 'bstc" when compiling. Copied bstc.exe to SimpleIDE/propeller-gcc/bin folder, and all was good.
    For those that do not have the file, I have attached it.
    Infernal Machine
  • This is pretty cool doing PropBasic over WiFi. Thanks Bean!
    Infernal Machine
  • Publison wrote: »
    This is pretty cool doing PropBasic over WiFi. Thanks Bean!

    Yeah it came in really handy when developing the TV driver.

    Bean
  • BeanBean Posts: 7,960
    edited October 23 Vote Up0Vote Down
    Here is a Mandelbrot set viewer for the Badge WX.

    Use the left rocker to move left,right or zoom in
    Use the right rocker to move up, down and zoom out.

    Enjoy,

    Bean

    P.S. Ken, I think this would make a great demo program for the Badge WX. But I might be a wee-bit biased...
Sign In or Register to comment.