Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Wireless Networking Build

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

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.
This discussion has been archived. No new comments can be posted.

ESP8266 Basic Interpreter Lowers IoT Entry Bar For Amateur Programmers

Comments Filter:
  • by Anonymous Coward

    (Blushes)

    • by phantomfive ( 622387 ) on Saturday January 09, 2016 @01:19AM (#51267143) Journal
      Yeah, me too, but remember that C64 BASIC didn't have an else statement, and even the IF statement was somewhat limited, meaning GOTOs everywhere. BASIC is not my choice for programming, even on the C64 anymore (where assembly is actually cleaner, and the assembler can do a good job re-numbering the lines).
      • So weaknesses and constraints on BASIC on the C64 impact it's usefulness today?

        I have a BASIC compiler for the PIC microcontroller that produces tight little binaries. It has a nice useful library of I/o functions.

        • Man, if you like it, then use it. Ignore what the world thinks, you'll be happier.

          It has a nice useful library of I/o functions.

          Libraries are usually more important than the language, anyway.

      • Re: (Score:3, Insightful)

        by Desty ( 2749557 )
        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 soun
    • Re: (Score:2, Funny)

      by hughbar ( 579555 )
      Do not be ashamed! Spent a lot of time in the late 1970's/early '80s with a Teletype 33 copying out 'Hunt the Wumpus' into a Honeywell-Bull Level 64 mainframe.

      It made me the person I am today, living alone in a basement, no friends, paint-stripper breath, three days beard and a very annoying pedantic way of talking. What, exactly, is not to like? We need to form a club, except that I don't get out very much.
    • Re: (Score:2, Interesting)

      by Anonymous Coward

      "...primarily older folks who fell in love with Basic on the Commodore, who are using it for controlling a variety of projects...."

      There was a time when the C-64, and even the lowly VIC-20, were used for simple Computer Control. JPL for instance used a VIC-20 for positioning parts in an SEU Test Setup, at various Accelerators. How do I know this? I have it. How did I get it?
      JPL was running at the Cyclotron, and their Positioner failed. I got the call at around midnight, they were scrapping the Run. T

      • by obsess5 ( 719497 )
        In the mid-1980s, I worked with a lady who had previously programmed a VIC-20 to replace a Telex machine. In the late 1990s, we were building a ground system for a communications satellite; the company building the satellite supplied us with test telemetry from the yet-to-be-launched satellite on a tape cassette along with a Commodore cassette storage device. (Not the earlier device I had for my VIC-20 that looked like a Kleenex box, but the later one that was about the size of a book and had rounded corn
  • $3 (Score:5, Interesting)

    by rfengr ( 910026 ) on Saturday January 09, 2016 @01:52AM (#51267183)
    The cost is what amazes me these days. This thing has two radio cores, two processor cores, and a host of other peripherals, and it's dirt cheap.
    • Re:$3 (Score:5, Interesting)

      by thinkwaitfast ( 4150389 ) on Saturday January 09, 2016 @02:35AM (#51267249)
      I've built things that sold in the 10's of thousands of dollars range and took people years to develop in the 90's that can now be made (often better) by a kid in high school with lunch money. I wonder what the long term affect this has on the economy.
      • it's zero or one... one for utopia
      • by rsilvergun ( 571051 ) on Saturday January 09, 2016 @11:39AM (#51268635)
        We're seeing it in the form of increased productivity rendering jobs obsolete. With fewer jobs people have to work more hours to make the same pay, resulting in yet more productivity and still fewer jobs. The Atlantic [theatlantic.com] has an article on it. tl;dr: Our productivity gains kept pace with what Keynes predicted but hours worked stopped dropping in the 70s, resulting in massive inequality and stagnant wages for workers.
      • by JanneM ( 7445 )

        I've built things that sold in the 10's of thousands of dollars range and took people years to develop in the 90's that can now be made (often better) by a kid in high school with lunch money. I wonder what the long term affect this has on the economy.

        Well, if it really takes off, the school cafeteria sector revenues are going to be hurting.

    • Comment removed based on user account deletion
  • Comment removed (Score:5, Interesting)

    by account_deleted ( 4530225 ) on Saturday January 09, 2016 @01:54AM (#51267189)
    Comment removed based on user account deletion
    • by raymorris ( 2726007 ) on Saturday January 09, 2016 @03:28AM (#51267333) Journal

      That's a valid point. Before you connect a "thing" to the internet, it would be wise to think about what happens when it's hacked. Unless the code is written by someone trained in security and then reviewed by someone else well-trained, it is reasonably likely that it will eventually be hacked. Internet-connected TVs have been hacked, wifi cameras are frequently hacked ...

      In some ways it's unfortunate timing that the internet has become so pervasive at the same time that simple programming has become so easy you can write software without any training or experience. It's resulted in a lot of very bad and dangerous software on the internet.

    • Comment removed based on user account deletion
    • by caseih ( 160668 )

      I suspect that with BASIC not relying on pointers at all for general function, security for IoT is probably a lot better than when C is used. I don't think your pessimistic comments about BASIC are really valid. Also this BASIC implementation is interpereted, so as long as the interpreter is secure with bounds checking, BASIC programs could well be very secure and correct, much more than many people's C sketches are in Arduino!

      For those interested, there's a project called MicroPython that implements a fu

    • by c ( 8461 )

      So, you've got a bunch of devices connected to the internet.

      To a WiFi LAN. Unless you're using some sort of "cloud" library in your application (and it doesn't sound like this ESP Basic thing does), it's no less secure than any other device on your network, and if your network isn't secure then you've got far more tempting targets for an attacker than a microprocessor board.

      Aside from price, that's one of the things that makes the ESP8266 device more attractive to me than one of the various boards that come

      • It supports integration with thing speak. Some other cloud services will be supported here soon. It also has a function that can simply retrieve a url and place the retrieved information in to a variable. So there are multiple ways to make it interact with the cloud and personal servers using standard web technology.
  • Not less (Score:5, Funny)

    by johnw ( 3725 ) on Saturday January 09, 2016 @02:09AM (#51267207)

    ESP8266 Basic is a project less than 6 moths old

    fewer than 6 moths.

  • Ob (Score:3, Funny)

    by Hognoxious ( 631665 ) on Saturday January 09, 2016 @02:11AM (#51267209) Homepage Journal

    10 WRITELN "FROSTY PISS"
    20 GOTO 10
    30 REM the lameness filter really is a piece of shit

  • Whose idea was to choose an interpreted language for the extremely slow 8-bit home computers?
    • Re:Why BASIC (Score:5, Insightful)

      by dacut ( 243842 ) on Saturday January 09, 2016 @03:26AM (#51267329)

      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 [wikipedia.org], 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 [mit.edu], 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.

      • Interesting. Now processors are so fast and memory so gigantic that interpreted languages make sense again. Compilation was necessary because resources were tight.

  • by The Cisco Kid ( 31490 ) on Saturday January 09, 2016 @03:27AM (#51267331)

    these, its unclear what is the device and what is an accessory for the device. Also unclear which are legit sellers and which might be spam.

    The the link to the ESP-01 in the make article leads to a discontinued page.

    Anyone got a link to a known reliable vendor to buy these?

    • by Lurks ( 526137 ) on Saturday January 09, 2016 @04:31AM (#51267429) Homepage

      There's heaps of them on eBay. Just get a NodeMCU 'dev kit'. There's a couple of vendors, nothing between them really. They cost about $5-8 from China. Then use NodeMCU and not this silly BASIC thing :)

    • Anyone got a link to a known reliable vendor to buy these?

      Not sure what you were searching for but Sparkfun was my number 2 google result for ESP8266. Adafruit is in the top 10 results as well

      https://www.sparkfun.com/produ... [sparkfun.com]
      https://www.adafruit.com/produ... [adafruit.com]

  • by Lurks ( 526137 ) on Saturday January 09, 2016 @04:29AM (#51267427) Homepage

    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/ [nodemcu-build.com]

  • I must be old... (Score:5, Insightful)

    by anchovy_chekov ( 1935296 ) on Saturday January 09, 2016 @04:32AM (#51267433)
    I remember when Basic was spelt BASIC, as in.. you know.. an acronym.
  • I am right now messing with nodemcu but it is somewhat flaky so I might go to the Arduino route. These devices are kind of annoying in that if you want to send data larger than a single packet you have to break it up yourself, their TCP stack is shite. Otherwise they seem pretty cool.

  • FTFY (Score:4, Insightful)

    by QuietLagoon ( 813062 ) on Saturday January 09, 2016 @09:15AM (#51268053)
    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.

  • I am 43 years old, and I learned:

    BASIC when I was 12
    LOGO when I was 13
    COBOL and RPG-II when I was 15
    Pascal (the only language I learned on my own and not in classes) when I was 16.
    C when I was 19
    Shell Scripting (including AWK) when I was 29

    Of all those, I only remember BASIC, C and Shell Scripting.

    If this will let me prototype an idea fast and cheap, then it is welcome.

    IIRC i read somewhere that Ken Silverman (of BUILD engine fame) used to try new algorithms first by coding them in BASIC. If that new ALGORI

    • Of all those, I only remember BASIC, C and Shell Scripting.
      If this will let me prototype an idea fast and cheap, then it is welcome.

      You can program the ESP8266 in BASIC (with this project), C (with the official SDK, or you can use it as an Arduino), or Lua scripting (with NodeMCU). I am just now experiencing Lua, it seems very like C or Javascript but without semicolons, which is to say that it has very little reason to exist but exists anyway. I will probably explore Arduino next, mostly because my current use case involves the Neopixel library, which has been ported to ESP8266. Pretty straightforward stuff, in theory, right? Except th

1 Mole = 007 Secret Agents

Working...