This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// server.js | |
// This program creates the server for controlling Arduino or similar projects. | |
// You can either use a web socket for real-time communication, or GET requests to send commands easily. | |
// Refer to the following "elevator.js" file for a working circuit file that accepts the commands. | |
// https://gist.github.com/dexterlabora/4a4692d0954eab107dd2 | |
// More info at www.internetoflego.com | |
// includes | |
var Primus = require('primus'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// energysave.js | |
// www.internetoflego.com | |
// Dependencies | |
var five = require("johnny-five"); | |
var board = new five.Board(); | |
// Arduino board connection | |
board.on("ready", function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// citystation.js | |
// Dependencies | |
var five = require('johnny-five'); | |
var raspi = require("raspi-io"); | |
var board = new five.Board({ | |
io: new raspi() | |
}); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// traincrossing.js | |
// Dependencies | |
var five = require("johnny-five"); | |
var board = new five.Board(); | |
// Arduino board connection | |
board.on("ready", function() { | |
// Train Crossing Components |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//trackswitch.js | |
var five = require("johnny-five"); | |
var board = new five.Board(); | |
//Arduino board connection | |
board.on("ready", function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//trafficsignal.js | |
var five = require("johnny-five"); | |
var board = new five.Board(); | |
//Arduino board connection | |
board.on("ready", function() { |
NewerOlder