GithubHelp home page GithubHelp logo

cluck's Introduction

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

cluck's People

Contributors

sequoia avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.