A nodejs express server to control RGB Matrix based on HUB75 connector
The project uses the excellent library by Alex Eden here: https://github.com/alexeden/rpi-led-matrix with a MAJOR addition.
I have found a way to easily use the JS Canvas APIs to write clamped arrays to the matrix. By exporting canvas to clamped arrays and then writing the array to the matrix, we now HAVE THE FULL POWER OF THE JS CANVAS APIS at our disposale.
Uses the JS canvas APIs from Konva and Node Canvas package to create powerful drawing APis for the RGB matrix
Allows handling 2 or more canvas elements to create layers. Max 3 canvases work OK on a rpi 2 and 3B +. Rpi 4 and 5 may support more layers but not tested yet
Shapes and Animation only limited to your imagination. Have examples showing how to integrate with GSAP APIs for advances tweens and Easing
Still tries to maintain 60 fps as much as possible. Further Optimization are still possible if someone is willing to guide me.
Works great from RPi 2 and above. Tested with RPi Zero W 2, see the specific section on Rpi Zero 2W below. Other Linux boards may need a rebuild of the Node Canvas lib.
Integrates with Matterjs for cool physics stuff..see Demos
Before running the node installation, please ensure the following packages are installed (this is on any debian system, for your package manager, please adjust the command accordingly
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
git clone https://github.com/narioinc/node-rgb-matrix
npm install --save --build-from-source
sudo npm start
to start the server on port 3000 on all network interfaces."rpi-led-matrix": "1.11.1"
in package.json. You can try v1.12.2 or above if you feel brave !!npm install --foreground-scripts --loglevel verbose
The express routes are evolving and currently we have the following endpoints
/mode
: allows you to change different modes/demo
: allows you to play some demos