Students will learn how to setup a simple single board computer through SSH. They will download the operating system and copy it onto their flash drive. They will boot the system. To test the installation, they will hook up a camera and run example face tracking python program and a target recognition program using computer vision.
Learning outcome:
Prepare portable computing platform with operating system and practice Unix shell skills.
Urs Utzinger, Updated 1/6/2026
Raspberry Pi (version 4 is used here but others will work too)
USB-C power supply 3A (Raspberry Pi 5 recommends 5A)
USB flash drive [or SD Card] (16 GBytes or larger)
Micro-HDMI to HDMI adapter
USB to Ethernet Adapter (List of suggested USB to Ethernet adapters with pictures of USB ports if you want to get one).
Ethernet Patch Cable
[Optional] WiFi network to which you can connect your devices.
{Optional] Display with HDMI cable such as your TV,
[Optional] Keyboard and mouse
!! Don't power Raspberry Pi on the USB port of your desktop or notebook computer. Raspberry Pi needs more than 2A . You like will permanently damage your computer !!
!! Electronics are exposed. If you place the Raspberry Pi on a metal part you will short it. Your laptop case, pen, screwdriver, coin are metal parts. If you drop screws, tools or jewelry on it, you will short it. It will not recover !! Common parts no longer working after shorting is display, wifi, usb ports.
You can add the mouse, keyboard and display when your Raspberry Pi is running but you shall not remove the flashdrive (or SD card) while it is running.
If you brake your Pi, we will offer you an older and slower model. If you brake that too, you will need to purchase and replace the Pi 4 and leave it with us. As one of the next assignments you will create a protector for the top and bottom of your Pi.
Please connect your Raspberry Pi according the written step by step instructions here. [YouTube video also available below]. We will want to accomplish the following tasks:
Installation of a boot medium that contains the operating system. In this setting we use a flashdrive because they are less expensive and faster than SD cards. Raspberry Pi does not have internal storage or a storage drive interface.
We will need to set up the Network. For the lab the Network SSID is MEDDEV-5G. The password is provided by the instructor.
For easier operation will need to configure other common options every computers has:
Hostname: e.g. yournamepi (urspi)
Username: e.g. urs
Password: *****
Less Common Options:
Remote headless operation (no display) using SSH. [servers and many internet of things devices.]
Remote display mirroring using VNC. You will need VNC viewer on your laptop. RealVNC provides RealVNC viewer. You do not need an account with RealVNC nor the VNC server. VNC is a remote desktop program and not commonly used on UNIX or Windows computers.
We will use a network patch cable to connect your laptop to the raspberry pi. If you don't have Ethernet RJ45 receptacle on your laptop, use the USB to ethernet adapters (black works for PC, sliver works for Mac). This is the simplest network connection between two computers and works on all computers.
Install the Raspberry Pi Imager: https://www.raspberrypi.com/software/ on your laptop or desktop computer.
We will change the boot order so that the Raspberry Pi will boot from flash drive by default [instead of SD card]:
Run the Raspberry Pi Imager and select Raspberry Pi 4, Operating System: Misc Utilities: Boot Loader: USB Boot, Choose Storage: The SanDisk flashdrive. !! Do not select any other drive otherwise you brick your computer.!!
Write the selected option to the flashdrive. Ignore requests from your computer to format the flash drive
Plug the flash drive into one of the blue USB ports.
Plug the power cable into the UBS-C port of the Raspberry Pi.
Let it run until you see not more flashing activity on the green and red LED.
Unpower the Raspberry Pi and remove the flash drive.
Run the Raspberry Pi Imager again and insert the flash drive in to a UBS port of your laptop/desktop computer. Select
Raspberry Pi 4 Model B
Operating System: Raspberry Pi OS 64 bit,
Choose Storage: Your flashdrive, e.g USB SanDisk 14.3GB. ! Do not select any other drive otherwise you brick your computer.!!
Customization
Hostname: yournamepi, e.g. urspi
Localization: Washington DC, America/Phoenix, Keyboard us
Username: yourname, e.g. urs
Password: use something simple you can remember
WiFi: Meddev-5G, Password: I tell you in class
Enable SSH and Use password authentication
Enable Raspberry Pi Connect
Create account with Raspberry Pi
Create new token, I clicked on Having Trouble to actually see it as I did not want the website to launch the installer.
Click Write. It can take 5-10 minutes to complete.
Temporarily attach a display to the Raspberry Pi and energize the Raspberry Pi. When the system starts properly and shows the desktop you can disconnect the display and let someone else on your bench use it. It will take about 30 seconds until desktop shows the first time. It might reboot and show it again.
Further configure the Raspberry Pi:
Connect the network patch cable to your notebook and Raspberry Pi.
Startup the Raspberry Pi.
Attach the network patch cable to the Raspberry Pi.
Connect the patch cable to the USB to Ethernet dongle.
Plug the USB to Ethernet dongle into your laptop/desktop (if you need USB-C adapter ask TA, ULA or instructor).
Open the settings for the Wired Network port on your laptop/desktop computer. I tmight be called USB Ethernet and often can be found when clicking on network indicator on your desktop (top right, bottom right of scrren).
The network adapter should show that it is as connected.
You will want to change the settings so that the IP4 as wekk as the IP6 method are set to shared to other computers. That makes your USB to ethernet dongle the access point for your Raspberry Pi.
Open Power Shell (Windows) or Terminal (Mac) and type ping hostname.local replacing hostname with the computer name you choose above.
If the Raspberry Pi responds we connect to it with ssh username@hostname.local using the username and hostname you choose above. Accept the certificate, type your password and you are connected.
Configure the Raspberry Pi by executing sudo raspi-config in the Terminal / Power Shell.
Under Interface Options, enable SPI, and I2C. We already enabled SSH and RPI Connect. You will need to use the arrow keys on your keyboard to navigate. The mouse does not work in a shell/terminal.
Select Finish.
FYI: SPI and I2C are used to connect sensors and you will use this again in this class and also in BME310.
Now you can connect with Raspberry Pi Connect from your computer to the Raspberry Pi.
On your laptop/desktop open https://connect.raspberrypi.com and login to your account. You will see your raspberry pi in the device list.
If the Raspberry Pi is turned on and connected to the internet you can connect to it. Even if its at home.
Update the Operating System
Open a terminal on Raspberry Pi which is the black icon on top left.
Execute sudo apt update in the terminal.
Decide if you have time to update. Execute sudo apt upgrade in the terminal. This will take at least 10 minutes to complete especially if 20 other students are using the network for the same purpose.
What is happneing now is the same as when your phone is installing upgrades. Here you manually started them and your phone does these commands automatically in the background.
Optional Add additional WiFi credentials
If you plan to use the Raspberry Pi on campus, you can add UAWiFi to the list of known SSIDs. You will want to edit the network by clicking on the wireless symbol on the top right. If it shows UAWiFi you can attempt conecting to it. You add settings also manually:
Security : WPA/WPA2-Enterprise
Authentication : EAP method: PEAP
Phase 2 authentication: MSCHAPv2
PEAP version: Automatic
Identity
Username: Your NetID
Password: Your NetID password
Anonymous identity: (leave blank)
Certificates
CA certificate: None
Select “No CA certificate required”
Domain (if requested): arizona.edu
No CA certificate is allowed at University of Arizona but not good practice.
You can also add the WiFi settings from your home.