Giter Site home page Giter Site logo

arduino-huelight-radar's Introduction

Arduino motion sensor powered Hue Lights

This uses an Arduino board, Ping sensor, and Hue lights to set up a motion sensor powered lighting system.

Breadboard

How it works

  1. The app samples the room for 100 sensor readings to determine the boundaries
  2. The app opens an event stream on the sensor stream and starts capturing events
  3. Depending on the event, certain API calls are made to the Hue lights
  4. Certain events can also toggle back into sampling mode to reprogram the room boundaries (cover the sensor to reset)

Stream Architecture

____________
|          |
| Ardunio  | Sensor does its shit
|  Sensor  |
____________
     ||
     ||
     \/
____________
|          |
|  Serial  |  Arduino pushes sensor data onto the serial connection to the PC
|   Port   |
____________
     ||
     ||
     \/
____________
|  NodeJS  |
|  Serial  |  Stream listens on the serial port for the feed of data, captures the buffer,
|  Stream  |  cleans the data, and then pipes it to the next adapter
____________
     ||
     ||
     \/
____________
|  NodeJS  |  This is piped from the NodeJS Serial Stream and takes in
|Aggregator|  the constant feed of sensor data and fills a buffer of 10
|  Stream  |  items at a time. Once filled, it aggregates the average and
____________  passes to the next stream
     ||
     ||
     \/
______________
|   NodeJS   | This is piped from the NodeJS Aggregator Stream and
|   Event    | is provided with the average of the last 10 sensor readings.
|Interpretter| It then creates an event object from the event factory based on
|   Stream   | conditions met by the data point provided
____________
     ||
     ||
     \/
_____________
|Interpretted| This listens for events coming in from the
|   Event    | NodeJS Event Interpretter stream and decides which endpoint
|  Handler   | to trigger on the Huelights API
______________
     ||
     ||
     \/
____________
|          |     Makes lights do shit!
| Hue Api  |
|          |
____________

arduino-huelight-radar's People

Contributors

atticoos avatar

Stargazers

 avatar  avatar  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.