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.
Older people who feel in love with basic on c64 (Score:2, Insightful)
(Blushes)
Re:Older people who feel in love with basic on c64 (Score:4, Informative)
Re: Older people who feel in love with basic on c6 (Score:1)
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.
Re: (Score:2)
It has a nice useful library of I/o functions.
Libraries are usually more important than the language, anyway.
Re: (Score:3, Insightful)
Re: (Score:2)
Re: (Score:2, Funny)
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)
Texas Instruments Silent 700
You experience a unique feeling of helplessness when you've run through your last roll of thermal paper. Soon into the game you realize that those people on TV who print a little then tear off the printout to show to others are frivolous and wasteful, consigning themselves to this sad fate. So you stop tearing it off, carefully rolling up the output so you can feed it back into the printer upside down and print on what was the (mostly blank) right margin, visually decoding the meshed characters at the cente
Re: (Score:2, Interesting)
"...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
Re: (Score:1)
Re: (Score:2)
Re: (Score:2)
--
Re: (Score:2)
I'm not quite dead.
I think I'll go for a walk.
$3 (Score:5, Interesting)
Re:$3 (Score:5, Interesting)
Re: (Score:1)
Massive technology unemployment (Score:5, Informative)
Re: (Score:2)
Well, if it really takes off, the school cafeteria sector revenues are going to be hurting.
Re: (Score:2)
Comment removed (Score:5, Interesting)
Re: (Score:2)
The Terminator actually used Apple ][ assembly.
http://mentalfloss.com/article... [mentalfloss.com]
true. Probably be hacked, so what happens? (Score:4, Interesting)
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.
Re: (Score:2)
Re: (Score:2)
Wait until IPv6 becomes necessary...
Re: (Score:2)
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
Re: (Score:2)
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
Re: (Score:1)
Not less (Score:5, Funny)
ESP8266 Basic is a project less than 6 moths old
fewer than 6 moths.
Re: (Score:1)
Re:Not less (Score:4, Funny)
I don't know what kind of moths you hang out with, but my moths are *huge* gossips. I'd hardly call them discreet.
Re: (Score:2)
Always ready to raise a flap, eh? I heard they just wing it.
Re: (Score:2)
Moths are a quantity of time? I couldn't find that in the Oxford dictionary.
Re: (Score:2)
Ob (Score:3, Funny)
10 WRITELN "FROSTY PISS"
20 GOTO 10
30 REM the lameness filter really is a piece of shit
Re: (Score:2)
"WRITELN"?
Re: (Score:2)
10 WRITELN "FROSTY PISS"
20 GOTO 10
30 REM the lameness filter really is a piece of shit
WRITELN is Pascal, IIRC
Why BASIC (Score:2)
Re:Why BASIC (Score:5, 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 [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.
Re: (Score:2)
The Jupiter Ace used Forth as a language, with a compiler included into the 8kb rom.
Well, "compiler" is overstating it a bit. The Jupiter Ace Forth (AFAIK) was a TIL-Threaded interpreter language, which "compiles" to a list of jumps. So there's still an interpreter, but it's more akin to interpreting byte code than a more standard BASIC interpreter. The Jupiter Ace Forth had to be, as it didn't save the source for the program but decompiled it for editing. A really neat feature that I missed when I "upgraded" to an Amstrad PC a couple of years later and (among others) F83.
But those were, i
Re: (Score:2)
Interesting. Now processors are so fast and memory so gigantic that interpreted languages make sense again. Compilation was necessary because resources were tight.
Re: (Score:2)
I'm guessing the $3 price is in volume (10k or 100k+). There are a number of eBay listings under $3 [ebay.com], but I wouldn't rely on eBay as a steady supply stream or for good documentation and support.
My preferred hobby vendors (because they've been supportive to me over the years; I'm not affiliated with them) are SparkFun and AdaFruit. SparkFun has them for $6.95 [sparkfun.com], while AdaFruit has a hacker-friendly version for $9.95 [adafruit.com] and a surface-mount version for $6.95 [adafruit.com].
Re: (Score:2)
Digikey has them with some minor volume discounts [digikey.com] for 10 units.
Ebay, banggood or alibaba have them dirt cheap. A got a couple boards this way, and they're perfectly fine and well made. In particular on alibaba there are a bunch of $1/unit suppliers, though that's the FOB price and then you're on your own.
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
Re: (Score:2)
I'm guessing the $3 price is in volume (10k or 100k+). There are a number of eBay listings under $3, but I wouldn't rely on eBay as a steady supply stream or for good documentation and support.
I don't think it matters much. There's not that much on the board and they are by definition pinned out a certain way no matter who makes them. I bought literally the cheapest ESP-01s to see if that would be a mistake and no, they're fine.
Trying to google search to buy one of (Score:3)
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?
Re:Trying to google search to buy one of (Score:4, Informative)
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 :)
Re: (Score:2)
"only" one of the 2 available gpio's on the esp8266-01 controls the boot mode, and only at boot time, then it's available for regular use... The other pin is free for general use.
It's still kind of restrictive :-) , but what I've found these (the -01's) really useful for is with i2c modules... i2c needs 2 signal lines and uses pull up resistors, so normally (including @ boot time) the 'program mode' pin is high for normal boot up... Add a pushbutton switch or jumper on that pin to ground and if it's close
Re: (Score:2)
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]
There's already an interpreted language on ESP8266 (Score:5, 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/ [nodemcu-build.com]
I must be old... (Score:5, Insightful)
Re: (Score:2)
We're wrong. The younguns are always right, because. History is a tuxedo mattress mouse. Words have no meaning.
Re: (Score:2)
You are literally correct. We must redouble our efforts.
I just started playing with these (Score:2)
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)
. ... a bunch of people who know little about security programming the IoT.
Just what we need
Is usefull for rapid prototyping (Score:2)
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
Re: (Score:2)
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
Re:Just what we need... (Score:4, Funny)
No, this is for those of us who were already brain-damaged by BASIC in the 1980s.
This is just retro drugs, move along kids, nothing to see here. No, son, that's a... vase with a smaller vase on the side, don't look at that. No, don't look under there.
I started with Apple Basic, not Commodore. But I had a Timex/Sinclair at home. 2K RAM!!!
Re: (Score:2)
wake me up when they ported the trs80 version of hunt the wumpus.
"oops, bumped a reset button. the ip address has moved."
Re: (Score:2)
You can get a new generation Z80 chip from Zilog for under $5, or an 8051 for $1.25. You can have 80s computers on a breadboard now. Load up all your old ROMs!
Re: (Score:2)
Object based programming: the Get-Off-My-Lawn of mathematicians everywhere. Why can't Jenny or Johnny code? 'Cause OO is designed to be nearly incomprehensible to humans without years of careful brain damage.
It was a teaching language pushed into production (Score:1)
As was Pascal. Probably because managers only took one programming course and so t was the only thing they felt comfortable with managing. Just wait the push for "everybody must learn to code" will produce a drive to use a teaching language such as Blocky. I can just see the conversation:
Tech lead: And so we're looking for a mixed Java/Node development team to push out the App.
Manager: Why? There so difficult to use, why not use Blocky it's easier. Besides everyone knows Blocky they taught it in grade schoo
Re: Arduino kids (Score:2, Informative)
Or, the Arduino/RPi kiddies have something accessible to them to engage and inspire them to learn something more.
Much like BASIC did back in the day on a cheap computer, inspiring us to learn more about programming.
Re: (Score:2)
Re: (Score:1)
Playing in the street and playing with guns is "fun". Six year olds driving cars is "fun". Programming undertaken by the clueless results in a mess of bugs and vulnerabilities. Hell, it's bad enough even with the best programmers.
Re: (Score:2)
Truth (Score:2)
People act like analog electronics are obsolete like the vacuum tube. The real world is analog.
Re: (Score:1)
believing that electronics is something anyone can do
Electronics is something that nearly anyone can do. That is not the same as saying everyone can do everything in the field (heck, many EEs will never be able to do certain things outside their specialization even if they dedicated their life to it). But that is irrelevant to the situation many people have where they don't need to do something difficult or complicated, just something simple but niche. Might as well complain such hobbyists are not learning Swahili either... because that is also unnecessary
Re: (Score:2)
that electronics is something anyone can do
I recently breadboarded a circuit to translate the input of a nine-position DIP switch into the output of a four-line BCD (Binary Coded Decimal) using an 74HC147, and a 4511 to display the number on a seven-segment LED digit. I came across a web page with a nearly identical circuit. Based on the comments by the Arduino/RPi kiddies, they have no clue to how the circuit works. One person asked why the BCD lines were inverted between the 74HC147 and the 4511. Reading the datasheets made it clear that the 74HC1