Martijn de Boer
Merge pull request #11 from sexybiggetje/snyk-fix-ba1c0e3cea0d509b7ad9b3ad2f114113
[Snyk] Fix for 1 vulnerabilities
|1 week ago|
|.github||2 months ago|
|__tests__||1 year ago|
|controllers||1 year ago|
|drivers||1 year ago|
|www||1 year ago|
|.codeclimate.yml||1 year ago|
|.eslintrc.json||1 year ago|
|.gitignore||1 year ago|
|.sidekickrc||1 year ago|
|.snyk||1 week ago|
|.travis.yml||1 year ago|
|CODE_OF_CONDUCT.md||1 year ago|
|CONTRIBUTING.md||10 months ago|
|LICENSE.md||1 year ago|
|README.md||2 months ago|
|SECURITY.md||2 months ago|
|config.example.json||1 year ago|
|package-lock.json||1 week ago|
|package.json||1 week ago|
|pixdisp.js||1 year ago|
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 https://github.com/vesteraas/node-unicornhathd
JPEG encoding by https://github.com/eugeneware/jpeg-js
mjpeg-server by https://www.npmjs.com/package/mjpeg-server
This application has some unit tests, making use of Jest. Jest is configured as a dev dependency.
Some code linting practices and security tests can be executed by running the lint task:
npm run lint
Simple clicking on the canvas in the responsive webinterface makes things light up; when you press submit it will get sent to the device.
The webinterface allows you to capture your camera and submit images from there.
A simple web interface is included for drawing on the device. Defaults to port 8080.