node rpi rgb led matrix
Installation
npm install rpi-rgb-led-matrix
Usage
var board =
start(rows=32, chain=1, clearOnClose=true)
Start updating the board.
-
rows - Vertical height of the board
-
chain - Number of boards chained together
-
clearOnClose - Automatically clear the display when node is shutting down
boardstart16 1 true
stop()
Stop updating the board. Call clear()
first to avoid random LEDs stuck on.
board
setPixel(x, y, r, g, b)
Set the color of a pixel. Black = off.
-
x y - Coordinates of the pixel, from the top left.
-
r g b - Red, Green, and Blue, numbers between or exactly 0 and 255
board
fill(r, g, b)
Fill the entire board with a solid color.
- r g b - Red, Green, and Blue, numbers between or exactly 0 and 255
board
drawCanvas(ctx, width, height)
Draw a canvas 2d context to the board.
-
ctx - Canvas context to draw.
-
width height - size of the canvas
board
clear()
Set all pixels to black.
boardclear
License
GPLv2 and some Public Domain