Breadboard for "Shift Register"

shift-register.png

Fritzing diagram: shift-register.fzz

 

Run this example from the command line with:

node eg/shift-register.js
var five = require("johnny-five");
var board = new five.Board();

// For use with 74HC595 chip

board.on("ready", function() {
  var register = new five.ShiftRegister({
    pins: {
      data: 2,
      clock: 3,
      latch: 4
    }
  });

  var value = 0;

  setInterval(function() {
    value = value > 0x11 ? value >> 1 : 0x88;
    register.send(value);
  }, 200);
});

 

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