This repo includes code for both RaspberryPi and it's web simulator. It's possible to design the code online before uploading to the Rpi.
- NodeJS
- RasperryPi (Gen 1+, Zero, Zero W)
- Wifi Adapter for Rpi (if not present on RaspberryPi itself or you are not using LAN)
- Adafruit 32x16 RGB LED Matrix (or alike)
- Jumper cables
- Push Switch for changing modes
- Connect the Push Switch to the RaspberryPi
- Connect the LED Matrix to the RaspberryPi
- Install latest NodeJS version on your RaspberryPi
- Install the Unix Service on your RaspberryPi using this guide
To start the browser simulation of the physical device:
$ npm install
$ npm run dev
RPI_ADDRESS=192.168.11.5 npm run deploy
This command will build the project for use in Rpi device and deploys it to the device over the local network.
The app cycles through "views". Each view is a program that shows something on the LED. For example clock
and bus
are views. The user can toggle through views using the physical switch button. For creating a view, create a file in views
folder. Each view should export these functions and properties:
setup()
a function that returns aPromise
. This function gets called once when the program starts.teardown()
a function that returns aPromise
. This function gets called once when the program ends.loop()
Loop function gets called repeatedly at a rate that you specify withfps
.fps
a properties that defines the rate at which the program callsloop
function. Number of frames per second.
This software is released under the MIT License