What you need
Handing out parts and checking everything is present before you start. If anything is missing, raise a hand — don’t improvise with parts from another kit.
Flash the SD card
The SD card is the Pi’s “hard drive”. Right now it’s empty. We need to write the operating system — Raspberry Pi OS 64-bit — onto it.
- Plug the microSD card into the laptop using the supplied adaptor.
- Open Raspberry Pi Imager. (Already installed on the classroom laptops. If not, download it from
raspberrypi.com/software.) - Click Choose device → Raspberry Pi 4.
- Click Choose OS → Raspberry Pi OS (64-bit). Make sure it says “with desktop”, not “Lite”.
- Click Choose storage and pick the SD card. Be careful here — if you choose the wrong drive you can wipe the laptop.
- Click Next, then Edit settings. Fill in:
- Hostname:
pi-iot-XX(where XX is your kit number). - Username:
coderra. - Password: a strong one. Write it down somewhere safe.
- Wireless LAN: the school Wi-Fi name and password. Country:
GB. - Locale: timezone
Europe/Jersey, keyboard layoutgb. - On the Services tab: tick Enable SSH with password authentication.
- Hostname:
- Save the settings, click Yes, and let the Imager write the card. This takes 4–6 minutes.
- When it says “Write successful”, eject the SD card.
Choosing the wrong drive will erase whatever is on it. The SD card is usually small (16–64 GB). If you see a 500 GB drive, that’s the laptop — not the card.
First boot & first update
Time to power the Pi on for the first time and bring it up to date.
- Insert the SD card into the slot on the back of the Pi.
- Connect the microHDMI cable to HDMI 0 (the one closest to the USB-C port) and the other end to a monitor.
- Plug in the keyboard and mouse.
- Plug in the official USB-C power supply last. The Pi has no power button — it boots as soon as it gets power.
- Wait for the desktop to appear. The first boot is slower than later ones.
Once you see the desktop, open a Terminal (the icon that looks like >_) and run:
sudo apt update
sudo apt full-upgrade -y
sudo reboot
This downloads the latest security updates and restarts the Pi. It can take 5–10 minutes the first time. You can read on while it works.
sudo mean?Superuser do. It runs a command as the “administrator” user, which is needed for changing the system. The Pi will ask for your password the first time you use it.
Connect the touchscreen
The official 5″ touchscreen connects to the Pi with one ribbon cable (called DSI) and four small jumper wires for power.
Always unplug the power supply before touching the ribbon cables. Connecting them while the Pi is on can damage both boards.
- Unplug the Pi’s power supply.
- Find the DSI port on the Pi (a thin slot labelled “DISPLAY” or “DSI”).
- Open the connector by pulling the black tab gently outward.
- Slide the ribbon cable in silver-side facing the USB ports. It only fits one way.
- Push the black tab back in to lock it.
- Do the same on the touchscreen’s connector.
- Connect the four jumper wires for power:
5V → 5V,GND → GND,SDA → SDA,SCL → SCL. The labels are printed on both boards. - Plug in the power supply.
The touchscreen should light up and show the desktop after about 30 seconds. Try tapping the screen — you should see the cursor move and clicks register.
If the screen is upside down (depending on how it’s mounted), open a terminal and edit the boot config:
sudo nano /boot/firmware/config.txt
Find the line [all] and add this just below it:
display_lcd_rotate=2
Save with Ctrl+O, Enter, then exit with Ctrl+X. Reboot.
Connecting the ribbon cable for the first time. It’s fragile and the connector is fiddly. Don’t force it.
Lock down SSH
SSH is how you log into the Pi from another computer over the network. Right now it accepts a password. We’re going to upgrade it to use a key instead — a pair of files that work like a much, much longer password no one can guess.
Open a terminal on your laptop (not the Pi) and run:
ssh-keygen -t ed25519 -C "pi-iot-XX" -f ~/.ssh/pi_iot_XX
Press Enter when it asks for a passphrase (leave it empty for the classroom). This makes two files in your ~/.ssh folder: a private key (keep secret) and a public key (safe to share).
Copy the public key to the Pi:
ssh-copy-id -i ~/.ssh/pi_iot_XX.pub coderra@pi-iot-XX.local
It will ask for the Pi’s password one last time. Now log in with the key:
ssh -i ~/.ssh/pi_iot_XX coderra@pi-iot-XX.local
You should be in without typing a password. From the Pi shell, turn password login off:
echo "PasswordAuthentication no" | sudo tee /etc/ssh/sshd_config.d/99-iot.conf
echo "PermitRootLogin no" | sudo tee -a /etc/ssh/sshd_config.d/99-iot.conf
sudo systemctl restart ssh
From now on, only your laptop’s key can log in. Test it: open a new laptop terminal and try to SSH again. It should work without a password. Try removing the -i flag — if SSH falls back to asking for a password, lock-down didn’t take.
Passwords can be guessed by automated bots scanning the internet. Keys are 256-bit random numbers — even a supercomputer would take billions of years.
Test the power bank
The Pi is portable, but only if the battery can keep up. A weak power bank causes the screen to flicker, the SD card to corrupt, or the Pi to reboot under load. We’re going to check yours before trusting it in a lesson.
Charge the power bank fully. Then:
- Unplug the official PSU.
- Plug the power bank into the Pi’s USB-C port.
- Wait for the touchscreen to come up. Use it for 5 minutes — tap around, open the browser, watch a video on the BBC website.
Then SSH into the Pi and run:
vcgencmd get_throttled
You want to see this:
throttled=0x0
0x0 means everything is fine. Anything else (e.g. 0x50000, 0x50005) means the Pi noticed an under-voltage event. The bank or the cable can’t keep up.
0x0Try a different USB-C cable first — cheap cables are often the problem. If that doesn’t help, the power bank isn’t up to it. Tell a teacher and swap it out.
Final verification
Walk through this list before you call Phase 1 done. If anything is missing, fix it now — later phases assume all of this works.