Seminar 1: Hardware demo!
Setting up your SD card
Install the Raspberry Pi imager on your host computer (not in a container) and run it
Download our OS image to your computer. This is the operating system we will load!
Insert the microSD card into your computer using the USB adapter (and possibly also the USB-C adapter).
Open the Raspberry Pi Imager and click “Choose device”. Select Raspberry Pi 3 from the list, then click Next:

Click “Choose OS”. Scroll all the way to the bottom of the list and pick “Use custom”, then select the
.imgfile you downloaded in step 1:
Click “Choose storage” and select your microSD card.
DANGER: Writing an image to the SD card erases any data on it. If you have other USB storage devices connected to your computer, make sure you have selected the correct disk! Our SD cards are safe to erase.
Click Next to write the image. Your operating system may ask for a password–this is normal, since it’s typical to need administrator privileges to write to the disk at the low-level that the imager needs.
When the imager finishes, the SD card is ready, yay!
Booting your Pi
To set up your Pi, you will need to connect the hardware to your computer, and start your serial console.
Hardware setup
To set up your hardware:
Insert the SD card into the Pi.
Connect the USB-Serial adapter to your computer (using a USB-C adapter if necessary)
Connect the three wires on the USB-Serial adapter to the I/O pins on the Pi, as shown in the figure below:

As a sneak peak for Project 1 and lectures 2-3, here’s a breakdown of what the pins mean (more info on pinout.xyz:
Cable wire Goes to Pi pin function black (GND) pin 6 Ground green (adapter RXD) pin 8 GPIO14 / TXD0 – the Pi sends here white (adapter TXD) pin 10 GPIO15 / RXD0 – the Pi receives here
Your Pi is now ready to boot up! Before we connect it to power, though, we need to start up the serial terminal to see the output.
Connecting your serial terminal
If you have a mac
First, we need to find out how to find the serial device on your computer. The serial device shows up as a special file called a device file, named something like
/dev/tty.usbserial-xxxxxxxx. To find it, run the following command:ls /dev/tty*and examine the output. You should see one device file matching the pattern
/dev/tty.usbserial-xxxxxxxx. Copy this name to use later.To connect to the serial device, we’ll use a program on your computer called
minicomor (if you don’t have it installed)screen. To run it, run the following (substituting the name of your serial device):minicom -D /dev/tty.usbserial-XXXX -b 115200`or, if this returns an error:
screen /dev/tty.usbserial-XXXX 115200
Once you start your terminal device, you should see a blank screen. This means the terminal is waiting for input from the Pi!
If you have Windows
Call over an instructor and we can demonstrate to you how to connect your terminal (it’s not difficult, but requires a visual reference).
Exercise
Now, it’s time to boot your Pi!
Plug in your Pi! You should see the red and green LEDs turn on as it begins loading data from the SD card
Once the Pi starts booting up, you should begin to see output! Wait for the device to boot up and present a login screen
Once the Pi starts up, log in with the username
root. You should get a shell, just like a typical terminalTry to navigate around the terminal like you would on your computer (
cd,ls, etc.). At minimum, run the following command to have some fun by playing a game of snake:/usr/local/bin/snake 1Once you’ve completed a game, it should display a code. Enter the code in this form for your attendance credit. We will send a separate form to ask for your opinions on 1690/2670 in general.