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.
(Blushes)
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!!!
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.
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.
Comment removed based on user account deletion
ESP8266 Basic is a project less than 6 moths old
fewer than 6 moths.
10 WRITELN "FROSTY PISS"
20 GOTO 10
30 REM the lameness filter really is a piece of shit
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Thank you, you are so right. Programming is fun, not just for some notional neckbearded priesthood. Yes, if one needs to do something 'serious' (avionics, billing SCADA) the approach must be more rigorous (looking at recent electric grid exploits, apparently that's not true of SCADA, in fact), but kids don't normally do that. It's a 'way in'.
On y va, qui mal y pense!
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.
wake me up when they ported the trs80 version of hunt the wumpus.
"oops, bumped a reset button. the ip address has moved."
--
"It is now safe to switch off your computer."
With ~$400, ebay, a laptop and two weekends, you can build every possibly rpi/arduino projects/hardware configration. There are a finite number of environmental parameters that can be measured (temperature, pressure, gasses, voltage, position, etc) and external effectors (voltage, current) are an even smaller set.
It has a nice useful library of I/o functions.
Libraries are usually more important than the language, anyway.
"First they came for the slanderers and i said nothing."
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 for most small projects.
all those companies charging thousands of dollars for their products are just ripping us off.
Some rip people off, but a lot of the time it just comes down to targeting a different audience. When you need to do something less commonly done, you often either end up spending a lot more to get something more customizable or something with a larger feature set, which is a waste if you didn't need any of those other extra (or even basic) features.
This isn't specific to even hobbyists, although in a business setting sometimes it is cheaper to blow thousands on a overkill off the shelf part than make a custom solution. But that isn't always the case. On a project I previously worked on, a sensor had an unusual communication protocol and was usually used with a hand held readout, but one day we needed it to be logged and in a compact spot without external wiring. The company only offered two options: a $2k usb adapter or a higher priced quote to make something custom for us. The hour it took an EE to make an Arduino communicate with the sensor and log what we needed cost us far less time and money. You could argue about there being faster and/or cheaper boards out there or that it would be better to make a custom board, but that would take more time, and hence cost the company more than just using what he had sitting around in a desk drawer. Saving $0.50 on the hardware or a faster clockspeed wouldn't have produced a better result, and would just be penny wise and pound foolish.
Whose idea was to choose an interpreted language for the extremely slow 8-bit home computers?
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?
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.
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.
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, while AdaFruit has a hacker-friendly version for $9.95 and a surface-mount version for $6.95.
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/
I remember when Basic was spelt BASIC, as in.. you know.. an acronym.
Digikey has them with some minor volume discounts 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.
And now, it is a great idea for newbie programmers to write apps for those internet connected devices in BASIC?
They don't have to be connected to the Internet, you know? Unless you've got a modem/router running in bridge-mode the devices will by default be running behind a NAT and I doubt most of these folks will go to the length of using UPNP to specifically request for the modem/router to open ports to the devices from the Internet.
DX.com ( http://www.dx.com/s/esp8266 ) also has a good selection of the ESP8266 -- both bare chips and proper devboards. I got the Nodemcu - compatible devboard ( http://www.dx.com/p/esp8266-es... ) myself and it has been fabulous so far. Though, it's not exactly $3 anymore.
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.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
Ebay is the best source. Or banggood.com
. ... a bunch of people who know little about security programming the IoT.
Just what we need
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 full-featured Python 3 interpreter on a microprocessor. Like the BASIC chip it's interpreted so it's slower than bare C. But it does let you use all the niceness and rapid development capabilities of Python on a 32-bit microprocessor.
Wait until IPv6 becomes necessary...
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 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.
Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
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 with some sort of cloud tie-in; it's my decision what it's allowed to do.
I've been playing around with ESP-12's for the last few weeks and what they're capable of with the libraries available is, for the price, nuts. It's as much work to properly debounce a lousy switch than to build a wireless HTTP server with OTA updates.
Log in or piss off.
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 74HC147 outputs ("0" = 1111) were opposite to the 4511 inputs ("0" = 0000). If you don't understand how the circuit is supposed to work, you're not going to understand the circuit when it doesn't work.
Alas, Jameco doesn't carry the part. Which is a shame. Since Jameco is in the next county over from Silicon Valley, my orders typically arrive in the next day mail.
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.
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 ALGORITHM worked out as intended, he would either refine the coding until he got the intended performance, or compile the basic, or recode in C or ASM... So, if it is good for him, I guess is good for me (and a lot of other people).
Besides, there have been BASIC compilers for a long while, so, if the prototype is a success, I may as well compile, or, if push come to shove, re-write in C.
*** Suerte a todos y Feliz dia!
The Terminator actually used Apple ][ assembly.
http://mentalfloss.com/article...
Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
I'm not quite dead.
I think I'll go for a walk.
I've fallen off your lawn, and I can't get up.
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!
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.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
People act like analog electronics are obsolete like the vacuum tube. The real world is analog.
Only the State obtains its revenue by coercion. - Murray Rothbard
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.