Before the Arduino, there was the Parallax Basic Stamp. It was an easy-to-use PIC chip on a PCB that you programmed in BASIC — a story of those humble beginnings was published earlier this week. Before that, even, legions of small computers from TRS-80s to Commodore 64s and even Altairs were commanded primarily by the BASIC language. BASIC was easy to run on a small machine and very simple to learn. Old fashioned BASICs are difficult to use to write huge systems, but a lot of small computers aren’t going to run very large programs anyway.
The ESP8266 is more than a just a WiFi peripheral for a microcontroller. It is its own little computer in its own right. While it is common to run the “AT” firmware, Lua, or program the device yourself, you can now load the beast with a version of BASIC.
Of course, just running BASIC wouldn’t be very interesting by itself. The real kicker is the extra keywords that allow control of the device’s WiFi hardware, I/O pins, and a dynamic Web page interface. You could very easily and very quickly set up prototypes using the simplified BASIC language and its extensions.
As an example, here’s one of the examples from the project’s home page:
cls print "hello world" let bla = "Test contents of textbox" textbox bla button "This is my button 1" [test1] button "This is my button 2" [test2] button Exit [TestExit] wait
[test1] print "You Clicked on 1" print bla wait
[test2] print "You CLiked on 2" let bla = "number 2 was clicked" wait
You can probably deduce that the first wait statement will generate a web page with a text box and three buttons. Clicking a button leads to a different part of the code that either generates a new web page or exits. Simple like BASIC should be.
There’s clear instructions about how to flash the software to your board (but be prepared to use Windows). There’s also strange warnings about not using multiple spaces, so apparently the parser for the language still needs a little work.
If you don’t like BASIC and you want a more direct route to program the CPU, we covered that earlier. Or perhaps you’d like to know more about using the Arduino IDE support for the module. If BASIC isn’t your speed, you can always try Lua, by following the instructions in the video, below.