Skip to content

Instantly share code, notes, and snippets.

@nooitaf
Last active May 25, 2016 03:37
Show Gist options
  • Save nooitaf/50e6b77e212ba509f47352c6ba9b17a4 to your computer and use it in GitHub Desktop.
Save nooitaf/50e6b77e212ba509f47352c6ba9b17a4 to your computer and use it in GitHub Desktop.
Johnny-five on Pi3
# install nvm | https://github.com/creationix/nvm
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
# install node 5.9 (v6+ did not work for me)
nvm install 5.9.0
#nvm use 5.9.0
#nvm alias default 5.9.0
# create project
mkdir project
cd project
touch app.js
# install packages
npm install raspi-io
npm install johnny-five
# start the programm
node app.js
# ---------------------------
# some stuff i experimented with to get it working
# if build fails some suggested using --unsafe-perm with sudo
# but you should not do sudo, but good to know
npm install -g --unsafe-perm raspi
npm install -g --unsafe-perm raspi-i2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment