Inky dash is an interface for Inky pHAT, an e-paper display for the Raspberry Pi, that can be accessed from a browser via a local web server.
- Install the latest version of Node, must be version 11 or greater.
- It's recommended to install Node through the Node Version Manager
- Using NVM run
nvm install node
- If your hardware is armv6, install the last supported version of node (11.15.0)
nvm install 11.15.0
. Newer unoffical builds can be found here.
- Ensure the Inky pHAT is correctly setup on your Pi. For help setting up the display follow this tutorial.
- Download the latest bundled release onto your Pi
- Unpack the tar
tar -zxvf inky_dash_v#.#.# .
(replacing#
with the relevant version) - Follow steps for running
- Change directories to the project root.
- If you downloaded the "release" from GitHub run the project with
node app.js
. If you cloned this repo run the project withnpm start
. - On another device browse to your Raspberry Pi on port 8080, e.g.
http://192.168.0.24:8080
. - From here you should be able to upload an image to the Pi and have it displayed.
Uploaded images must conform with the confines of the Inky pHAT display:
- Dimensions are 212 x 104 pixels.
- Colour palette is white, black and (red or yellow) in that order, see here.
- File format is PNG.
Auto start
There are numerous solutions to running Node scripts on boot, here are a few possibilities:
A quick and dirty way could be placing a line in rc.local to run the node server, similar to:
su pi -c '/home/pi/.nvm/versions/node/v11.15.0/bin/node /home/pi/inky_dash_v1.0.0/app.js < /dev/null &'
You have to be explicit with the node binary as the user's PATH variables are not accessible during boot up.
- Clone this directory onto your Raspberry Pi using Git clone
- From the project root run
npm build-all
Note: On hardware with low RAM such as the Pi Zero it may be quicker to build on a more powerful machine and copy across the files
Tech Stack:
- Node.js + Express handles REST API and serves the interface.
- React + Redux used in construction of the interface.
Requirements
- Node.js v11+
It may have been more suitable to have created Inky Dash using a Python web framework such as Flask, but the primary purpose of this project was so I could get more experience with the Express framework and React library.