This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rpio = require('rpio'); | |
const ws281x = require ('rpi-ws281x-native'); | |
var rpi_options = { | |
gpiomem: false, // /dev/gpiomem for non-root but only GPIO access ( /dev/mem provides full access but requires root) | |
mapping: 'physical' // use physical pins (stay the same on all boards) | |
} | |
var active = false | |
var timeLastPressedStopButton = Date.now(); | |
const STOP_BUTTON_PIN = 18 // input (physical pin 18 = bcm (gpio) 24) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM balenalib/raspberrypi3-debian-node:10.20.0-buster-build | |
# Install other apt deps | |
RUN apt-get update && apt-get install -y --no-install-recommends | |
# Move to app dir | |
WORKDIR /usr/src/app | |
# Move package.json to filesystem | |
COPY ./package.json ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
"dependencies": { | |
"apollo-server-express": "^1.3.6", | |
"babel-cli": "^6.26.0", | |
"babel-core": "^6.26.3", | |
"babel-preset-env": "^1.7.0", | |
"babel-preset-react": "^6.24.1", | |
"body-parser": "^1.18.3", | |
"cors": "^2.8.4", | |
"express": "^4.16.3", |