Breadboard for "Servo - PCA9685"
Fritzing diagram: servo-PCA9685.fzz
Run this example from the command line with:
node eg/servo-PCA9685.js
const {Board, Servo} = require("johnny-five");
const board = new Board();
const controller = "PCA9685";
board.on("ready", () => {
console.log("Connected");
// Initialize the servo instance
const a = new Servo({
controller,
pin: 0,
});
const b = new Servo({
controller,
range: [0, 180],
pin: 1,
});
a.to(0);
b.to(0);
});