Skip to content

Latest commit

 

History

History
87 lines (45 loc) · 1.36 KB

relay.md

File metadata and controls

87 lines (45 loc) · 1.36 KB

Relay

Relay - normally open

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

docs/breadboard/relay-open.png

Fritzing diagram: docs/breadboard/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.

docs/breadboard/relay-closed.png

Fritzing diagram: docs/breadboard/relay-closed.fzz

 

Additional Notes

 

License

Copyright (c) 2012-2014 Rick Waldron waldron.rick@gmail.com Licensed under the MIT license. Copyright (c) 2015-2023 The Johnny-Five Contributors Licensed under the MIT license.