Strategic Artificially Intelligent Nodeular Transport Number 5 - Expose Johnny-Five objects via Spacebrew for fun and profit!
var five = require("johnny-five"),
saint = require("saint-five");
saint.connect(); // Connect to Spacebrew
var board = new five.Board();
board.on( "ready", function() {
// Wire johnny-five objects to Spacebrew by calling
// saint.wire and pass the object to be connected
saint.wire( new five.Button( 2 ) );
saint.wire( new five.Led( 13 ) );
});
By default this will create a connection to the public Spacebrew Admin interface. Any johnny-five objects connected will have their appropriate inputs and outputs revealed in the interface ready to be wired as you wish!
To connect to another server: saint.connect({ server: 'http://localhost/' })
- LED (boolean)
- Button (boolean)
- Partial Servo support (min and max are exposed)
- Nodebot (Using Device Orientation data from the spacebrew-utils Sensor utility)
- Support more Johnny-Five devices!
- Inject J5 objects into REPL in examples
MIT