Relay - normally open
The breadboard diagram shows a Keyes Relay, however any Relay will work.
Fritzing diagram: relay-open.fzz
Run this example from the command line with:
node eg/relay.js
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
var relay = new five.Relay(10);
// Control the relay in real time
// from the REPL by typing commands, eg.
//
// relay.on();
//
// relay.off();
//
this.repl.inject({
relay: relay
});
});
Illustrations / Photos
Relay - normally closed
The breadboard diagram shows a Keyes Relay, however any Relay will work.
Fritzing diagram: relay-closed.fzz
Additional Notes