Halesowen College · T Level Data Analytics
Microcontrollers · Architecture · Wi-Fi
For our project, a microcontroller is ideal — it boots in milliseconds, sips power from a USB socket, and runs our sensor loop 24/7 without any user intervention.
Important: The college Wi-Fi uses enterprise authentication (802.1x). We will use a mobile hotspot during initial testing.
How the Pico talks to the sensor
from machine import Pin
btn = Pin(15, Pin.IN)
print(btn.value())
led = Pin(25, Pin.OUT)
led.value(1) # HIGH → on
led.value(0) # LOW → off
Inter-Integrated Circuit — a 2-wire serial bus invented by Philips (1982)
0x76 or 0x77Why I2C and not SPI? SPI is faster but needs 4 wires per device. I2C's 2-wire bus is perfect for slow sensors where we want clean wiring.
4 connections. One sensor. All the data.
Only 4 jumper wires needed — power, ground, data, clock
| BME680 pin | Wire colour (convention) | Pico W pin | Why |
|---|---|---|---|
| VCC | Red | 3V3 (pin 36) | Powers the sensor — 3.3 V, not 5 V |
| GND | Black / Brown | GND (pin 38) | Completes the circuit |
| SDA | Yellow | GP4 (pin 6) | Serial data line (I2C bus 0) |
| SCL | Blue / White | GP5 (pin 7) | Serial clock line (I2C bus 0) |
Critical: Always use the 3V3 pin (3.3 V), never the VBUS pin (5V) — the BME680 is a 3.3 V device. 5 V will destroy the sensor permanently.
No soldering. No permanent connections. Perfect for prototyping — pull a wire and fix your mistake.
Check before powering on: Ask a partner to verify your wiring against the table before connecting USB.
Hands-on assembly · Time to wire up
Follow the wiring table and build your breadboard circuit.
(3 min) Orient the Pico W so it straddles the central gap. Confirm the USB port is accessible from the edge of the board.
(5 min) Connect 3V3 → red rail and GND → blue rail using jumpers. Verify polarity before going further.
(5 min) Place the BME680 module. Wire SDA → GP4 and SCL → GP5 using a yellow and blue jumper respectively.
(7 min) Peer review: Swap boards with your neighbour. Cross-check the 4 connections against the wiring table. Only connect USB once both reviewers agree.
💡 If the Pico's LED blinks when you connect USB, it has power. If MicroPython is already flashed, the REPL prompt will appear in Thonny.
Quick check — does the Pico see the BME680?
from machine import I2C, Pin
i2c = I2C(0, sda=Pin(4), scl=Pin(5))
print(i2c.scan())
[118] — hex 0x76, the BME680 address ✓
[] — empty list → sensor not found → check wiring[118] — BME680 found at 0x76 → wiring correct ✓[119] — BME680 at 0x77 → also valid ✓[104, 118] — two devices found → normal if two sensorsNothing shows? Power off → re-check VCC and GND → re-scan. Never wiggle wires while powered on.
Date TBC · MicroPython Fundamentals
Writing your first sensor-reading loop in MicroPython — variables, while True, formatted output, and your first live readings from the BME680.
Before next session: Install Thonny IDE on your device — free at thonny.org. We'll use it to write and upload code.
Optional reading: MicroPython Quick Reference for RP2040 at micropython.org/rp2
Questions? Get in touch:
jwilliams.science · HalesAir Project