Difference between revisions of "ESP8266"
(→Brain dump on the ESP8266 $2 computer)
|Line 30:||Line 30:|
== Conclusions ==
== Conclusions ==
It's a rocky road to getting anything
It's a rocky road to getting anything working on these primitive systems - but for $2 each, there are definite benefits.
Latest revision as of 11:08, 24 February 2017
Brain dump on the ESP8266 $2 computer
WARNING: ESP 8266 SYSTEMS ARE NOT FOR BEGINNERS!
Several places sell ESP8266-based systems in the US and Europe - but they charge WAY too much for them. Go to Ebay. Search for ESP8266 - that’s the name of the chip - don’t pay more than $3! There are several different board designs based upon it. I've used the ESP-01 - which is the simplest/smallest of the board designs. If possible, I suggest finding an “ESP-12F” board - that’s my favorite.
It runs nicely on two AAA or AA batteries.
You *WILL* have to solder connections just to make the system work at all.
Soldering wires to the ESP-12F is a bit fiddly - the ESP-01 has an 8 pin connector that makes that easier. But the ESP-01 only exposes a couple of I/O pins - which is really limiting. The ESP-12F exposes all of the useful pins on the chip.
If you’re using the ESP-12F board you’ll need a soldering iron (get a fine-tipped one with variable wattage) and one of those magnifying glasses with “helping hands” grippers. This tiny board is not easy to solder to! You’ll need some ~30 AWG solid core wire because the holes in the PCB are very small.
You’ll also need an “FTDI 232” board (Search eBay - but this one works: http://www.ebay.com/itm/like/112240012039) to connect the ESP board to USB so you can program it from the PC. Be sure to set the switch/jumper to 3.3v and not 5v or you'll destroy your ESP board!
The ESP8266 was designed ONLY to be used in a WiFi dongle that you plug into a regular computer. However, with an external flash memory, you can reprogram it to do MUCH more impressive things.
The system comes with a set of ROM functions that you can call fairly easily from C. However, that didn’t do what I needed - so I bypassed it...you'll probably want to make use of it.
There is a modest community of developers at http://esp8266.net with a forum and such - that’s where you’ll find links to documentation, the SDK, etc.
There is a full software SDK with the GNU C compiler for cross-compilation onto the device. I managed to make it run C++, but it takes some work to do that.
I’ve never tried doing this kind of dev work from a Windows or Mac computer - so you’ll almost certainly need a Linux computer (or at least dual-boot into Linux).
As I said at the outset, this is NOT an easy system to work with - don’t expect it to be like Arduino or Raspberry Pi. The tools are rough - and the community of developers is tiny and not much help when you have difficult questions. There is hardly any sample code to work with and the manufacture's support services aren't much use either. Debugging code is difficult - there is no debugger and even using 'printf' can fail to tell you what's going on because the serial output stream has to be interrupt-driven and if your program crashes, then the diagnostic message you sent with printf right before it crashed will never happen!
At $2 each, ESP8266-based boards are “disposable items” during development. I bought 20 of them! So if I want to know how much power supply voltage they can take - or whether they can produce enough current to drive some device I have, I can crank up the volts until it breaks and not worry about it. However, shipping charges can easily overwhelm the price of the system - so if you buy them one at a time, you’ll be paying WAY more!
It's a rocky road to getting anything working on these primitive systems - but for $2 each, with on-board WiFi - there are definite benefits.