TITLE: Installing Swarm of Pis 
AUTHORS: Olivier George

[DESCRIPTION]
This protocol guides you through the installation of a swarm of raspberry Pis

[GUIDELINES]
Setup only 1 Rpi at a time to be able to identify the IP address


[STEPS]
SECTION: Install Ubuntu on the Mini PC
2. Install Ubuntu:
https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/

https://ubuntu.com/download/desktop/thank-you?version=20.04.2.0&architecture=amd64

Mini PC

  

SECTION: Flash the SD card with the latest RPi clone
3. Download RPi clone: https://www.dropbox.com/sh/1amlryd6fecnxy6/AAC9ciEt40Nshn_uxyLiahRaa?dl=0
Download and install RPi Manager (works best on MacOS or Ubuntu): https://www.raspberrypi.org/software/

SECTION: Flash the SD card with the latest RPi clone
3.1. 
Run RPi Manager
 
For Operating system: Select "Use Custom .img" at the bottom and select your RPi Clone int he dropbox folder
 
 
For Storage: Install the SD drive in the SD drive reader and select the SD drive "/boot"
 
Click "Write" and Accept the warning message
 
Let it Flash!
 
Repeat for every SD card, you can just select the new Storage after swapping SD Cards
 

SECTION: Flash the SD card with the latest RPi clone
3.2. 
SECTION: Put together all the parts
1. Read the paper here: 

Order Parts: 
  
add power strips, 

 
SECTION: Put together all the parts
1.1. Put together RPi parts:

Connect RPi to NoIR Camera using the 2 ft flat connector (Blue tab on the side of the black connector)
Connect the PoE HAT to the RPi
Connect the RPi to Ethernet cable
Connect Ethernet cable to the Ethernet Switch
Install the IR Lights on the top of the cages using the Med Associates screws and plug it to 12V adapter

SECTION: Put together all the parts
1.3. Repeat for each Pi
SECTION: Setup mini PC + Ethernet switch + Pis parameters
5. Setup Parameters for the Ethernet Switch: 
https://github.com/alexcwsmith/PiRATeMC/tree/master/networking
SECTION: Setup mini PC + Ethernet switch + Pis parameters
5.1. Install Open SSH

SECTION: Setup mini PC + Ethernet switch + Pis parameters
5.2. Setup UCSD LAN and private LAN
SECTION: Setting up streaming Parameters
7. Get the cameras IP list:

 


 
SECTION: Setting up streaming Parameters
7.1. Type in the browser (Chrome) the IP address of the Camera: 10.1.1.XX:8080
XX changes for each camera
Select: Settings 
Vertical mirror: enable
AWB mode: OFF
Save
Home

 

SECTION: Put together all the parts
1.2. Build the camera holder
5.3. 
SECTION: Setup Pis parameters
5.4. Setting up new RPi 
DO ONLY 1 AT A TIME TO IDENTIFY THE IP ADDRESS
install SD card with no power in Rpi
Power the Rpi (USB)


SECTION: Setup Pis parameters
5.5. In the Linux Terminal
Get the IP address: it will be the newest ip address listed: here 10.1.1.64
 

 
SECTION: Setup Pis parameters
5.6. Take control of the RPi 
Type in the following code
Select: yes when prompted to continue connecting
Enter the password: raspberry

 
 
then the  three successive commands will be the following:
and will be explained step by step below
 

SECTION: Setup Pis parameters
5.8. Modify the RPI Hostname

 
Change the Hostname to something like Set1110Box11
 
 
 
 
 
 
 
SECTION: Setup Pis parameters
5.7. Add the Box # to the ./recordVideo/sh file

PS: if you need first to reconnect with the pi use ssh, if not just use nano
 
original file
 
Add the Box number to the file after every $1_ (example : Box11) and change the parameters:
box# there are 5 places to put the Box# nanfter the $1_... two in the line that starts with 'raspivid' (NOTE THERE IS 1 AFTER GREYWORLD YOU MAY BEED TO ENLARGE THE SCREEN, twice in the line that starts with MP4Box, once in the line that starts with sshpass and once in the line with rm
-br 55
-w 800
-h 600
 
Type Ctrl+X to exit and Save the file Y
 
 
Type Enter to rewrite the file
 


SECTION: Setup Pis parameters
5.9. Modify the .bashrc file to change the directory where the files are saved

 
 

 
 

SECTION: Setup Pis parameters
6. Add the Pi to the Alias on the .bashrc file of the MiniPC
start terminal

 
 
Add the latest RPi to the list on the line that starts with alias

alias camconnect='cssh pi@10.1.1.51 pi@10.1.1.52 pi@10.1.1.53 pi@10.1.1.54 pi@10.1.1.55 pi@10.1.1.56 pi@10.1.1.57 pi@10.1.1.58 pi@10.1.1.59 pi@10.1.1.64'



 

That's it you can move on to the next RPi!

SECTION: Setup Pis parameters
4. Test the recording