Adafruit 8x8-Matrix with NodeJS
Control your Adafruit 8x8 Matrix with NodeJS. Your nodejs script have to run as root.
Setup
$ npm i 8x8matrix
const Matrix = ; let matrix = ;matrix;
Options
let matrix = brightness: 15 slaveAddress: 0x70 bautrate: 10000;
API
Pixels can be written by a simple js-array with 64 objects.
var smily = 00111100 01000010 10101001 10101001 10000101 10111001 01000010 00111100; matrix; /** * Set brightness of all LED * Values: 1 (very low) to 15 (very bright) */ matrix; /** * Set first top-left LED to on * matrix.setLED(x, y, true/false); */ matrix;
Test
$ sudo node test.js