Pi IoT Academy
Phase 1 · Build Your Pi

Phase 01

Build your Pi.

In this phase you’ll turn a brand-new Raspberry Pi into a working portable computer with a touchscreen. Once you finish, your Pi will boot anywhere — on a desk, on a battery, in a corridor. That’s the foundation for everything else.

~60–90 min Difficulty: 2 / 3 Work in pairs Hardware lesson

What you need

Get this all on your desk before you start.
Raspberry Pi 4B (8 GB)
The brain. Smaller models won’t do for this course.
Official 5″ touchscreen
DSI connector + 4 jumper wires for power.
microSD card, 32 GB, A2
SanDisk Extreme or similar. Slow cards make a slow Pi.
Official 27 W USB-C PSU
For the desk. The battery comes later.
USB-C power bank
At least 10 000 mAh and 5 V / 3 A. We’ll test it in step 5.
microHDMI → HDMI cable
Backup display for the very first boot.
USB keyboard & mouse
Only needed for first boot. SSH from then on.
Ethernet cable (optional)
Useful if Wi-Fi isn’t cooperating.
A teacher will help with

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

~10 minutes

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.

  1. Plug the microSD card into the laptop using the supplied adaptor.
  2. Open Raspberry Pi Imager. (Already installed on the classroom laptops. If not, download it from raspberrypi.com/software.)
  3. Click Choose device → Raspberry Pi 4.
  4. Click Choose OS → Raspberry Pi OS (64-bit). Make sure it says “with desktop”, not “Lite”.
  5. Click Choose storage and pick the SD card. Be careful here — if you choose the wrong drive you can wipe the laptop.
  6. 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 layout gb.
    • On the Services tab: tick Enable SSH with password authentication.
  7. Save the settings, click Yes, and let the Imager write the card. This takes 4–6 minutes.
  8. When it says “Write successful”, eject the SD card.
Double-check the storage drive

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.

Checkpoint

First boot & first update

~15 minutes

Time to power the Pi on for the first time and bring it up to date.

  1. Insert the SD card into the slot on the back of the Pi.
  2. Connect the microHDMI cable to HDMI 0 (the one closest to the USB-C port) and the other end to a monitor.
  3. Plug in the keyboard and mouse.
  4. Plug in the official USB-C power supply last. The Pi has no power button — it boots as soon as it gets power.
  5. 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:

terminal · on the Pi
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.

What does 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.

Checkpoint

Connect the touchscreen

~15 minutes · Be gentle

The official 5″ touchscreen connects to the Pi with one ribbon cable (called DSI) and four small jumper wires for power.

Power off first

Always unplug the power supply before touching the ribbon cables. Connecting them while the Pi is on can damage both boards.

  1. Unplug the Pi’s power supply.
  2. Find the DSI port on the Pi (a thin slot labelled “DISPLAY” or “DSI”).
  3. Open the connector by pulling the black tab gently outward.
  4. Slide the ribbon cable in silver-side facing the USB ports. It only fits one way.
  5. Push the black tab back in to lock it.
  6. Do the same on the touchscreen’s connector.
  7. Connect the four jumper wires for power: 5V → 5V, GND → GND, SDA → SDA, SCL → SCL. The labels are printed on both boards.
  8. 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:

terminal · only if the screen is upside down
sudo nano /boot/firmware/config.txt

Find the line [all] and add this just below it:

config.txt
display_lcd_rotate=2

Save with Ctrl+O, Enter, then exit with Ctrl+X. Reboot.

A teacher will help with

Connecting the ribbon cable for the first time. It’s fragile and the connector is fiddly. Don’t force it.

Checkpoint

Lock down SSH

~10 minutes · Done from the laptop

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:

terminal · on the laptop
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:

terminal · on the laptop
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:

terminal · on the laptop
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:

terminal · on the Pi
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.

Why turn passwords off?

Passwords can be guessed by automated bots scanning the internet. Keys are 256-bit random numbers — even a supercomputer would take billions of years.

Checkpoint

Test the power bank

~10 minutes

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:

  1. Unplug the official PSU.
  2. Plug the power bank into the Pi’s USB-C port.
  3. 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:

terminal · on the Pi
vcgencmd get_throttled

You want to see this:

good output
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.

If you see anything other than 0x0

Try 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.

Checkpoint

Final verification

5 minutes

Walk through this list before you call Phase 1 done. If anything is missing, fix it now — later phases assume all of this works.

Phase 1 sign-off

Phase 1 complete?

Brilliant. You’ve got a working Raspberry Pi — updated, secure, portable. Next phase: install all the software it needs to become a proper IoT lab.

Phase 2: Install the platform  →

(The button unlocks when every box above is ticked.)