UNPKG

node-blinkt

Version:

A Node.js Library to Interact With the Raspberry Pi Blinkt! LED Hat.

16 lines (11 loc) 233 B
const Blinkt = require('../Blinkt'); const leds = new Blinkt(); let r=0, g=0, b=0; leds.setup(); setInterval(function() { leds.clearAll(); leds.setAllPixels((++r)%255, (++g)%255, (++b)%255, 0.1); leds.sendUpdate(); } , 10);