Skip to content

Boilerplate to create Node.js IoT system with Arduino and Socket.io

License

Notifications You must be signed in to change notification settings

kosamari/IoT-Boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Boilerplate to create Node.js IoT system with Arduino and Socket.io

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published