A basic example of interfacing a PS3 controller on a Raspberry Pi using NodeJS.
Note: at the moment of writing it doesn't work yet with NodeJS 10, use latest version of 9 instead (I used 9.9.0
).
sudo apt-get update
sudo apt-get install joystick -y
npm i
sudo node .
We need to use sudo
because we can't communicate with the GPIO otherwise, there's ways around this but out of scope.