Monday, March 28, 2016

Over The Air (OTA) esp8266 setup

Why OTA?

  1. it's faster than updating a sketch via USB/ftdi
  2. lets you update code when the module + sensor is wedged where the sun don't shine.
    1. under a dishwasher
    2. behind a fridge
    3. in an attic
    4. in a crawlspace
    5. up a tree
    6. surrounded by man eating racoons bent on world domination 


There's a *bunch* of info out there on getting over the air programming to work with an esp8266.  Much of it describes processes that are more difficult than necessary because...well, it's moved very, very fast.  As of the June 2015 timeframe, it still required quite a bit of handstanding on your head while juggling watermelons to work right.  We are lucky that an awful lot of the difficult bits are solved now.


After a bunch of futzing around, finally got the right combination of libraries, etc.

To wit:


  1. update to the latest arduino IDE (very important) - 1.6.8 as of this post
  2. use Examples=>ArduinoOTA=>BasicOTA as your base sketch
  3. Set the board to "generic esp8266 module" ... even if you're using something like the Adafruit Huzzah ... which I was.
  4. update the sketch with your wifi ssid and pw
  5. upload via normal USB/Serial method


Follow the rest of the steps here:
https://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html

*POOF* magic happens.

You're welcome.

No comments:

Post a Comment