Relay - normally open

The breadboard diagram shows a Keyes Relay, however any Relay will work.

relay-open.png

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.

relay-closed.png

Fritzing diagram: relay-closed.fzz

 

Additional Notes

 

Component Classes in this example:

Hi! The Johnny-Five community is building new projects every day. We made this newsletter to tell you about what's new, what's good, and what's next for Open Source robotics. Join us in exploring what we can make together.

Fork me on GitHub