Skip to content

Sequoia/cluck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cluck

This is:

  1. a sketch for the Sparkfun Thing (ESP8266 board) that posts the state of a door (when it changes) to <data.sparkfun.com>
  2. a webpage that reads the data from <data.sparkfun.com> 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 data.sparkfun.com
  8. flash onboard LED 2x
  9. disconnect WIFI
  10. go to sleep for specified # of seconds
  11. GOTO 1

Webpage

  1. read new status from data.sparkfun.com 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages