

This is the 1stย partย of a series of 3ย posts on the new ESP8266 microcontroller
I only talk about a bare handful of newย boardsย because most of them don’t pass myย test: whether they’ll let me do something today that I couldn’t do yesterday.
But every once in a while a new board, or a chip, comes along that makes me sit up in my chair. The ESP8266 isย one of those, and the things that make it interesting isย that makers areย coming up to me and telling me about it. There was no marketing company here, this has all been about theย community.
The ESP8266 is a UART to WiFi SoCย built around aย Tensilica Xtensa LX3 processorย โ shipping on a somewhat bewildering varietyย of breakout boardsย โ the most commonlyย available beingย the ESP-01 which has a tiny form factor and can cost less than $5, although it’s more typically priced around $7 forย low volumes.
The boards, and the underlying ESP8266 SoC, wasย initially marketedย as a Serial-to-WiFi adaptor, and comesย with a firmware supporting a simple AT command set to configure and control the wireless module.
What most people initially missed was that the SoC was fully programmable, this wasย a general use micro-controller, with Wi-Fi and โ albeit somewhat limited โ GPIO, all for $5 or less. This probably had something to do with the fact that, at least at first, all the documentation was in Chinese.
However it didn’t take all that long for interesting things to start happening. Most of the initial effort was to get GCC running on the platform, but things quickly progressed from a functioning GCC through to an SDK, and on to other languages like Micro Python, and a Lua-based firmware that gave access to both GPIO and scripting support.
All the while building a community and accumulating documentation. Still, things weren’t what you’d call easy. However all that changed over the weekend as Richard Sloan and Ivan Grokhotkovย released a version of the Arduino IDE that supported the ESP8266ย โ and just in time for Arduino Day. Happy Birthday!
What’s Supported by the Build?
The short answer is quite a lot โ basic functions likeย pinMode, digitalRead andย digitalWrite work as you’d expect. As do interrupts, and the millis and micros functions, and sensibleย things done toย delay to take account of the background activity of WiFi and TCP tasks, and there is a Ticker library for calling functions with a certain cadence.
The Serial object also works as you’d expect it to, and the environment ships with aย custom libraries to handle WiFi that looks and acts mostly the same way as the official WiFi shield library.
There is also support for EEPROM โ although it doesn’t quite work the way you’d expect โ and limited I2C support, alongside OneWire and mDNS support. Basically,ย any third party libraries that don’t rely on low level access to the AVR should work, although there hasn’t been extensive testing as yet.
Whyย should I use the ESP8266?
Whileย the ESP8266 can’t do everything you could do with an Arduino โ for instance it only has one PWM pin thatย isn’t even exposed by the ESP-01 breakout board we’ve used here, you’d have to go looking for something like the Olimex board that Sandeep was using to get access to it โ but for $5 it’s a bargain.
For $5 it doesn’t have to do the same amount as you can do with an Arduino, because at $5 you can afford to buy 5 or 6 of them for the price of a single Arduino board.
“This is inexpensive enough to be very much in the territory of ‘thousands of sensors-launched-out-of-a-cannon’-cheap.” โ Brian Jepson
The ESP8266 was already well on its way to becoming โ almost by stealth โ one of the leading platforms for the Internet of Things. It’s super cheap, and super easy to work with, and it’s actually fairly easy โ as such things go โ to get your hands on, which makes a refreshing change.
However the arrival of Arduino compatibility is step change, suddenly theย growing but still small community has opened their platform up to a much larger community. Suddenly there is a huge pool of people that ย know how to work with the board, and I think we’re going to see an explosion of projects and products that otherwise wouldn’t get made. Because suddenly we have our hands on a WiFi board, that we all know how to use, that’s almost cheap enough to throw away.
Get out your soldering iron and buy some boards, I’d love to see what you build with it. Especially if it involves cannons.
This isย the firstย of three posts on the ESP8266 microcontroller.ย The secondย part of this series coversย installation of the new Arduino environment and building and uploading your first sketch to your ESP8266 board, while the final part discusses creating a breadboard adaptor for the ESP-01 breakout board.
ADVERTISEMENT