First-Time Configuration of Sensor Pis

Initial System Settings

Upon starting a Pi the first time you will be prompted to set some general system settings

  1. Set the language and timezone

  2. Leave the username/passwords as the default (pi and raspberry respectively)

  3. Connect the pi to the internet (most easily done using a mobile hotspot, if available)

Configuring feh

A program called feh must be installed. This is used for displaying stimuli images fullscreen.

  1. Ensure the Pi is connected to the internet

  2. Open a terminal

  3. Enter the command sudo apt install feh

  4. Enter the password when (if) prompted

Configuring LED libraries

Setup the libraries used for controlling the LED strips.

  1. Ensure the Pi is connected to the internet

  2. Open a terminal and run sudo apt-get install gcc make build-essential python-dev git scons swig

  3. Run the command sudo nano /etc/modprobe.d/snd-blacklist.conf and enter “blacklist snd_bcm2835”. Hit Ctrl-X Ctrl-Y Enter to save and exit

  4. Run the command sudo nano /boot/config.txt and change the line “dtparam=audio=on” to “#dtparam=audio=on” (comment it out)

  5. Reboot the Pi

  6. Open a terminal and enter git clone https://github.com/jgarff/rpi_ws281x

  7. Run the following

  8. Run cd rpi_ws281x/

  9. Run sudo scons

  10. Run cd python

  11. Run sudo python setup.py build

  12. Run sudo python setup.py install

  13. Finally, you should copy the file “led.py” included in the backend directory into this directory (the python directory)

Enabling SSH

In order for the webserver to control the LEDs and displays remotely, SSH must be enabled on all of the sensor Pis. You will get a warning about the default password being set but this is fine since these Pis will be on an isolated network.

  1. Click theRaspberry Pi icon in the top left corner of the screen

  2. Click “Preferences” from the dropdown menu and then select “Raspberry Pi Configuration”

  3. Select the “Interfaces” tab

  4. Select “Enable” for SSH and then click “Save”