Skip to content

Instantly share code, notes, and snippets.

@bmoren
Last active March 26, 2019 19:14
Show Gist options
  • Save bmoren/cd984d9a8f36f268b73ef136f554ee7b to your computer and use it in GitHub Desktop.
Save bmoren/cd984d9a8f36f268b73ef136f554ee7b to your computer and use it in GitHub Desktop.
how to set up a standalone Raspberry pi with node for one off art projects

work in progress 3/13/19

Installer Script

  1. ssh into your pi
  2. run wget -qO- XXXXXXXX/install.sh | bash
  3. dont forget to sudo raspi-config and change the boot options to command line (auto login as user pi)
  4. to change the video file which plays on boot, alter the video file path in your ~/.bashrc or change the filepath in the installer script before running it!

Manual Install:

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install usbmount
  4. install nvm & node.js latest: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
  5. source ~/.bashrc to load nvm
  6. nvm install stable to install npm & node.js
  7. npm install -g forever to install forever
  8. sudo apt-get install git
  9. git clone the project you want to use
  10. setup the auto run on startup (above)
  11. setup the AP mode on the pi
  12. setup auto loading of the project with a host apd config (below) -- not working!
  13. install FTP Access

auto-run on startup (the installer script does this automatically!)

  1. run sudo raspi-config, navigate to the boot options and choose command line (auto login as user pi)
  2. install forever: npm install forever -g
  3. nano ~/.bashrc
  4. find the line to load NVM export NVM_DIR="/home/pi/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm or something similar
  5. add forever start ~/XXXXXXXXXX/server.js below the NVM listeners
  6. ctrl+x then Y then Enter to save
  7. sudo reboot

HOST APD config

# Network Authentication Type
# This parameter indicates what type of network authentication is used in the
# network.
# format: <network auth type indicator (1-octet hex str)> [redirect URL]
# Network Authentication Type Indicator values:
# 00 = Acceptance of terms and conditions
# 01 = On-line enrollment supported  
# 02 = http/https redirection
# 03 = DNS redirection
#network_auth_type=00
#network_auth_type=02http://www.example.com/redirect/me/here/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment