Feb 28, 2025

Public workspaceInstalling Swarm of PisĀ 

ThisĀ protocolĀ is a draft, published without a DOI.
  • 1University of California, San Diego
  • George Lab @ UCSD
    Tech. support email: olgeorge@ucsd.edu
Icon indicating open access to content
QR code linking to this content
ProtocolĀ Citation:Ā Olivier George 2025. Installing Swarm of PisĀ . protocols.io https://protocols.io/view/installing-swarm-of-pis-bv5qn85w
License: This is an open accessĀ protocolĀ distributed under the terms of theĀ Creative Commons Attribution License, Ā which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working
Created: June 26, 2021
Last Modified: February 28, 2025
ProtocolĀ Integer ID: 51088
Abstract
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

Put together all the parts
Put together all the parts
Read the paper here:

Order Parts:
Download parts list.xlsxparts list.xlsx
add power strips,

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

Build the camera holder
Repeat for each Pi
Install Ubuntu on the Mini PC
Install Ubuntu on the Mini PC
Flash the SD card with the latest RPi clone
Flash the SD card with the latest RPi clone
5m
5m
Download and install RPi Manager (works best on MacOS or Ubuntu): https://www.raspberrypi.org/software/


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


5m

Setup Pis parameters
Setup Pis parameters
5m
5m
Test the recording

Setup mini PC + Ethernet switch + Pis parameters
Setup mini PC + Ethernet switch + Pis parameters
5m
5m
Setup Parameters for the Ethernet Switch:
Install Open SSH

Setup UCSD LAN and private LAN

Setup Pis parameters
Setup Pis parameters
5m
5m
Setting up new RPi
DO ONLY 1 AT A TIME TO IDENTIFY THE IP ADDRESS
  1. install SD card with no power in Rpi
  2. Power the Rpi (USB)


Critical
In the Linux Terminal
  • Get the IP address: it will be the newest ip address listed: here 10.1.1.64
Command
dhcp-lease-list


Take control of the RPi
  • Type in the following code
  • Select: yes when prompted to continue connecting
  • Enter the password: raspberry

Command
ssh pi@10.1.1.64

then the three successive commands will be the following:
and will be explained step by step below
Command
nano .bashrc
nano ./recordVideo.sh
sudo raspi-config

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
Command
ssh pi@10.1.1.64
nano ./recordVideo.sh
  • 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



Modify the RPI Hostname

Command
sudo raspi-config
  1. Change the Hostname to something like Set1110Box11







Modify the .bashrc file to change the directory where the files are saved

Command
nano .bashrc


Command
sudo reboot

Add the Pi to the Alias on the .bashrc file of the MiniPC
start terminal

Command
nano .bashrc

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'



Command
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!

Setting up streaming Parameters
Setting up streaming Parameters
Get the cameras IP list:

rpicam@set1110Videos:~$ dhcp-lease list



Setting up streaming Parameters
Setting up streaming Parameters
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