Boilerplate to create Node.js IoT system with Arduino and Socket.io
Switch branches/tags
Nothing to show
Clone or download
Latest commit 16818f2 Jan 20, 2016
Permalink
Failed to load latest commit information.
breadboard chenge circuit Jan 20, 2016
public initial commit Oct 25, 2015
views initial commit Oct 25, 2015
.gitignore Initial commit Oct 25, 2015
LICENSE Initial commit Oct 25, 2015
README.md Update README.md Jan 20, 2016
client.js initial commit Oct 25, 2015
package.json initial commit Oct 25, 2015
server.js initial commit Oct 25, 2015

README.md

IoT Boilerplate

This is a boilerplate to create Node.js IoT system with Arduino and Socket.io I have been using this system for most of my network controlled hardware project.

System

The system is divided to of 3 parts.

  1. Web server (hosts controller website & socket.io connections) server.js
  2. Controller website views/controller.html
  3. Arduino Client client.js

system

Demo Setup

For sample, I've included small code to turn LED on and off from website, & receive message on webserver when button is pressed.

  1. Set up your hard ware as below
    demo setup
  2. From your computer (or on your server) start a server node server.js
  3. From your computer connected to Arduino via USB, start Arduino client node client.js
  4. Open localhost:5030 in your browser to see controller site

note: if you are running server.js and client.js from different computer (i.e server.js on hosting service & client.js on your Raspberry Pi) You'll need to change socket.io address in client.js and views/controller.html

Setup for your own system

  • For hardware setup, I recommend browsing Johnny-five doc and edit client.js
  • You can add as many socket message as you like and customize your controller website by editing server.js and views/controller.html.