Little Bird Terminal Recordings real sessions you can scrub, not screenshots Import a recording
Enabling I2C from the raspi-config menu 0:24 · 98×30 · 32 views Download .cast Embed view

The way almost everyone enables I2C: the raspi-config menu, captured on a real Raspberry Pi 5 Model B running Raspberry Pi OS Bookworm. I2C is genuinely off at the start, so the walkthrough is Interface Options, then I5 I2C, then Yes. Two things are worth watching for. The confirmation defaults to No, so pressing Return straight away leaves I2C disabled — you have to move across to Yes first. And raspi-config applies the change immediately as well as writing dtparam=i2c_arm=on to /boot/firmware/config.txt, so /dev/i2c-1 and the SDA1 and SCL1 pin functions are there the moment you Finish, with no reboot. The keystrokes were really typed at a really running raspi-config; nothing here is drawn after the fact. Nothing is wired to the header on this Pi, so the closing i2cdetect scan is a working but empty bus. For a setup script or an image build, the same job in one line is at /casts/rMDmv-_JmZ0.

Commands in this recording

  • 0:01 sudo raspi-config nonint get_i2c Ask raspi-config whether I2C is on before touching the menu. 1 means disabled, 0 means enabled.
  • 0:02 ls /dev/i2c-* Only i2c-13 and i2c-14, the Pi 5's internal display buses. The header bus i2c-1 is not there yet.
  • 0:03 pinctrl get 2,3 Header pins 3 and 5, reading as plain inputs because nothing has claimed them.
  • 0:04 sudo raspi-config The menu. From here: 3 Interface Options, I5 I2C, then Yes — and Yes is not the default, so Tab across to it before pressing Return.
  • 0:18 sudo raspi-config nonint get_i2c Now 0. The same question as before the menu, with the opposite answer.
  • 0:19 grep -n i2c /boot/firmware/config.txt What the menu actually wrote: dtparam=i2c_arm=on. This is the part that survives a reboot.
  • 0:20 ls -l /dev/i2c-1 The header bus, live already — raspi-config applies the parameter as well as saving it, so no reboot is needed.
  • 0:21 pinctrl get 2,3 The same two pins, now SDA1 and SCL1 in alt mode a3. Hardware proof the menu did something.
  • 0:22 i2cdetect -y 1 Scan the header bus. All dashes because nothing is wired to this Pi — a working, empty bus. Connect a sensor and its address appears in the grid.

Embed this recording

Shared from Little Bird Electronics. The file at .cast is a plain asciicast v2 recording — it plays in the asciinema CLI too.