Skip to content
No description, website, or topics provided.
Branch: gh-pages
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is:

  1. a sketch for the Sparkfun Thing (ESP8266 board) that posts the state of a door (when it changes) to <>
  2. a webpage that reads the data from <> 1x/second and updates the page text/color when it's changed.

Arduino sketch

  1. Wake up from sleep
  2. Read last state from EEPROM
  3. Read new state from door sensor
  4. If they are different:
  5. flash onboard LED 1x
  6. connect WIFI
  7. post new state to
  8. flash onboard LED 2x
  9. disconnect WIFI
  10. go to sleep for specified # of seconds
  11. GOTO 1


  1. read new status from 1x/second
  2. If it's different, update page

Don't forget!

  • connect DTR to XPD to utilize deepSleep. If you do not, your thing will not wake up from sleep 'til it's manually reset
  • on wakeup, sketch starts from the top so state can only be preserved across sleep by writing to EEPROM before sleep & reading from it after
You can’t perform that action at this time.