Little application to drive Led matrix displays on your raspberry pi
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Martijn de Boer 7160af6a78
4 weeks ago
.github Create FUNDING.yml 4 weeks ago
__tests__ Add cleanup to driver, for tests. Add forceExit flag for jest because it doesn't close otherwise. 1 year ago
controllers Add cleanup to driver, for tests. Add forceExit flag for jest because it doesn't close otherwise. 1 year ago
drivers Add cleanup to driver, for tests. Add forceExit flag for jest because it doesn't close otherwise. 1 year ago
www Remove unused snippets 1 year ago
.codeclimate.yml Configure codeclimate plugins 1 year ago
.eslintrc.json Add eslint-plugin-security and config 1 year ago
.gitignore Tests and Travis 1 year ago
.sidekickrc Add sidekick 1 year ago
.snyk fix: .snyk, package.json & package-lock.json to reduce vulnerabilities 1 month ago
.travis.yml Add eslint 1 year ago Add the code of conduct file 1 year ago docs:minor grammar changes 8 months ago First work in progress app 1 year ago Updates 4 weeks ago Create 4 weeks ago
config.example.json Working implementation of drivers, and drawing application. Things light up! 1 year ago
package-lock.json Updates 4 weeks ago
package.json Updates 4 weeks ago
pixdisp.js Add preliminary support for writing sandboxed javascript for animation purposes. Renders a single frame now. 1 year ago

MIT Licence Known Vulnerabilities Maintainability Test Coverage Build Status

A small application to drive LED matrix displays, such as the Pimoroni Unicorn, from nodejs. My intention is to create a digital graffiti/guestbook system and a general animation system. This is a project for fun, so if you have a feature just request it! Or add it and I’ll review it. Social coding ftw.

Make sure you are on a recent nodejs version. Raspbian has an old version. Use Nodesource ;).

Also, use a decent modern browser. I wrote recent syntax, so probably works best in Chrome 62+. Firefox is known to have some issues, Edge works, Safari is a PITA. Just wait for your browser to play catch up then with recent standards. If you dislike Chrome, you can put this through Babel. But you’re on your own there.

Copy config.example.json to config.json and pick a driver + display size.


npm install
nodejs pixdisp.js

optionally npm install pi-spi jpeg-js mjpeg-server

Navigate to http://localhost:8080/

Matrix driver & Unicorn Hat HD driver inspired by

JPEG encoding by

mjpeg-server by

Unit tests

This application has some unit tests, making use of Jest. Jest is configured as a dev dependency.


npm test

Some code linting practices and security tests can be executed by running the lint task:

npm run lint


Device drawing

Simple clicking on the canvas in the responsive webinterface makes things light up; when you press submit it will get sent to the device.


Using your camera

The webinterface allows you to capture your camera and submit images from there.


Web interface

A simple web interface is included for drawing on the device. Defaults to port 8080.



Demo (Click for youtube)

With an advanced editor you can write simple animations in the browser using a secure sandboxed javascript. Documentation will follow here once the API is final.