Experiments with the ESP8266

IMG_3363

I’ve been meaning to jump on the Internet of Things bandwagon, but I’ve just been a bit turned off by the price point. I built a simple temperature logger for my fermentation fridge using a Spark Core, but the experience was not that straightforward…or as straightforward as I wanted it to be for using in the classroom.

Then the ESP8266 came around, and then it got Arduino support and then I couldn’t keep away. I’ve been tinkering with the idea of creating a super easy to use Wifi connected device that would allow my students to more or less flip a switch and start collecting sensor data wirelessly. The lesson would result in creating active data visualizations, not the details of creating this wireless data streaming device. The ESP8266 looked like it could provide a cost effective solution to this little challenge.

So I snagged a few ESP8266s from eBay and got them out of the bag yesterday. I tried to use the little ‘carrier board’ that came in the $7 eBay kit, but couldn’t get code over. Tracing the board back, I found I wasn’t able to manipulate a few pins I’d need to ground for programming then disconnect…so I soldered up a pretty shoddy little protoboard and connected it to a breadboard. A big thanks to Alasdair Allan on the Make Magazine blog for an article that got me through building this board and programming the board.

I got the data pushing out to data.sparkfun.com easily enough using some example code by Liam Marshall on Hackaday.io. The code went over in no time, and connected directly to the network instantly. I was super surprised…I expected a bigger struggle. I actually has less trouble with the ESP8266 then the Spark Core. (Which I still have configured to pump data directly in to Google Sheets instead of a service like Phant.)

Now that the data is streaming, it is time to start creating the ease of use component…which is the hard part for sure. I’m going to aim to create a simple Python front end that will pipe the SSID and password into the code and reprogram the board. Alternatively, I might simple try to pump the data over serial into precompiled code to avoid running into programmer issues. Once I can get it to a ‘plug it in and tell it the SSID and password’ point, I’ll start thinking about where to collect the data. Likely I’ll set up a Phant.io install and collect the data that way.

Check out the data stream here.

See the code below.