docs/led-array.md
Demonstrates controlling multiple LEDs at once through the use of an LED array. Requires LEDs on pins that support PWM (usually denoted by ~).
Fritzing diagram: docs/breadboard/led-array.fzz
Run this example from the command line with:
node eg/led-array.js
const {Board, Leds} = require("johnny-five");
const board = new Board();
board.on("ready", () => {
const leds = new Leds([3, 5, 6]);
leds.pulse();
});
Control multiple LEDs at once by creating an LED collection (Leds).
All must be on PWM pins if you want to use methods such
as pulse() or fade()
<!--remove-start-->
Copyright (c) 2012-2014 Rick Waldron [email protected] Licensed under the MIT license. Copyright (c) 2015-2023 The Johnny-Five Contributors Licensed under the MIT license.
<!--remove-end-->