Slashdot Mirror


ESP8266 Basic Interpreter Lowers IoT Entry Bar For Amateur Programmers (esp8266basic.com)

New submitter mmiscool writes: ESP8266 Basic is a project less than 6 moths old. It is open source and designed specifically for the internet of things. The ESP8266 microcontroller costs less than $3, and once the basic firmware is loaded to the device a user can connect to it using Wi-Fi and start programming right inside their web browser. No wires, no software or plugins to install. Just a simple text editor. There is now a community, primarily older folks who fell in love with Basic on the Commodore, who are using it for controlling a variety of projects. The code is amazingly simple and includes commands for interfacing with neo pixels, OLED displays, Temperature sensors, hobby servo motors and of course the blinky LED. It also provides commands for browser widgets that can be used to construct interfaces for the device like textboxes, buttons, sliders and dropdowns. The bottom line is that Basic is not dead, and has finally made its way into the internet of things. Make last year ran a three-part series on the chip (here's part one), but things have advanced quite a bit since then, when people were first noticing that the ESP8266 is more powerful than the tasks for which it was first marketed.

6 of 112 comments (clear)

  1. Older people who feel in love with basic on c64 by Anonymous Coward · · Score: 2, Insightful

    (Blushes)

    1. Re:Older people who feel in love with basic on c64 by Desty · · Score: 3, Insightful

      It is true... C64 "V2" Basic was my first taste of programming and I was pretty much hooked straight away, even though it was a fairly unpleasant dialect, with line numbers and no auto-renumbering function, only two significant characters in variable names (so "speed" and "spinning" were the same variable, leading to code with awful variable names) and the lack of any commands for controlling the audio hardware or doing anything with video other than writing characters and symbols. The only way to make sound or create sprites (or even change the screen colours) was to use POKE commands to write to arbitrary memory locations (generally through trial and error, as a kid with no documentation, before the web existed).

      Still, there was enough magic there that once you'd really gotten a taste for it, there was no going back. On the plus side, almost every programming language after that seemed really reasonable if not generous :)

  2. Re:Why BASIC by dacut · · Score: 4, Insightful

    Whose idea was to choose an interpreted language for the extremely slow 8-bit home computers?

    Because fitting a compiler into the tight memory constraints was next to impossible. The BASIC ROM on the C64 was 8 kB; per Wikipedia, this is what forced Commodore to revert to v2.0 BASIC, which lacked even disk directory listing commands (remember LOAD "$", 8 and how it would clobber whatever you had in memory?).

    Applesoft BASIC, which had these features, used 10k of ROM by comparison. Apple's earlier Integer BASIC was about the same size, but gave up floating-point support.

    BASIC made it easy for beginners (like myself) to get something working. If Commodore had only included an assembler, for example, this would have been too steep of a learning curve for most folks and they would likely have bought something else that did have an interpreter. That said, anyone writing "real" programs wrote them in assembly; you had to resort to extreme tricks to get decent graphics on these systems. If you haven't seen it, I highly recommend picking up a copy of Racing the Beam , which documents all the trickery that programmers for the Atari 2600 (which had weirder hardware but still was 65xx-based) had to resort to in order to make even halfway decent games.

  3. There's already an interpreted language on ESP8266 by Lurks · · Score: 4, Insightful

    Since it hasn't been mentioned here. The ESP8266 is no stranger to interpreted languages. The NodeMCU firmware offers a Lua interpreter. It's been around for longer than this BASIC project and is now fairly robust. I have created a couple of projects with it and been pleasantly surprised, particularly with support for the u8glib library. This is just outstanding.

    There's lots of reasons to like an interpreted language on a device like this. That said, the hardware/libraries integration and maturity is way more important than exactly what interpreted language. I feel a tag nostalgic for BASIC but I don't really see the utility over the excellent NodeMCU firmware. There's even an online firmware builder that allows you to select which features, ostensibly hardware protocols and the like, to bake in so you can maximize how much free heap there is. http://nodemcu-build.com/

  4. I must be old... by anchovy_chekov · · Score: 4, Insightful

    I remember when Basic was spelt BASIC, as in.. you know.. an acronym.

  5. FTFY by QuietLagoon · · Score: 3, Insightful
    ESP8266 Basic Interpreter Lowers IoT Entry Bar For Creating Security Vulnerabilities in IoT Devices.

    .
    Just what we need ... a bunch of people who know little about security programming the IoT.