AI agents & screen readers: for a machine-readable, text-only catalogue, start at /llms.txt. Products are available as Markdown (/products.md, /products/{handle}.md) and JSON (/products.json, /products/{handle}.json).
Store

Choose a sensor by what you want to measure, then check how it connects. Most here use I²C; analog sensors need an ADC on a Raspberry Pi computer but plug straight into a Pico's ADC pins. Every sensor lists its interface, logic voltage and anything else your board needs, and says "Not stated" where its listing doesn't.

Shop sensors by what they measure

Find a sensor

Tell us what you want to measure and which board it's for. We'll list the sensors that do it, with the interface, logic voltage and any extra part your board needs. Where a listing doesn't say, we show "Not stated".

Which board is it for?
Soldering

Three ways to get started

Each setup lists every part, the wiring and the code. The wiring follows each product's listing and the board's pinout; we haven't bench-tested these setups ourselves yet.

No soldering

No soldering — weather and air quality on a Raspberry Pi

A BME680 in a Breakout Garden HAT measures temperature, humidity, pressure and air quality, with nothing to solder.

Parts

Wiring

  • Breakout Garden HATFits onto the Raspberry Pi's 40-pin GPIO header
  • BME680 breakoutPush into any Breakout Garden slotwith the sensor facing out

Set it up

  1. Turn on I²C in Raspberry Pi Configuration (Interfaces tab), or with sudo raspi-config → Interface Options → I2C.
  2. Check the sensor is found: sudo i2cdetect -y 1 should show 76.
  3. Install Pimoroni's library in a virtual environment: pip install bme680.
  4. Run the example below. Allow about 20 minutes of burn-in before trusting air-quality readings.
import bme680

sensor = bme680.BME680(bme680.I2C_ADDR_PRIMARY)
if sensor.get_sensor_data():
    print(sensor.data.temperature, "°C")
    print(sensor.data.humidity, "% RH")
    print(sensor.data.pressure, "hPa")

Sources: BME680 Python library (Pimoroni), Raspberry Pi documentation: configuration

Digital

Digital (I²C) — distance with a time-of-flight sensor

A VL53L1X measures 4 cm to 4 m over I²C, wired straight to the GPIO header.

Parts

Wiring

  • SolderingSolder the included right-angle female header to the breakout
  • 2–6V → pin 1 (3.3 V)SDA → pin 3 (GPIO 2)
  • SCL → pin 5 (GPIO 3)INT → pin 7 (GPIO 4); GND → pin 9

Set it up

  1. Push the breakout onto pins 1, 3, 5, 7 and 9, the bottom-left corner of the header.
  2. Turn on I²C in Raspberry Pi Configuration (Interfaces tab).
  3. Check the sensor is found: sudo i2cdetect -y 1 should show 29.
  4. Install Pimoroni's library in a virtual environment: pip install vl53l1x.
import VL53L1X

tof = VL53L1X.VL53L1X(i2c_bus=1, i2c_address=0x29)
tof.open()
tof.start_ranging(1)  # 1 = short range, 2 = medium, 3 = long
print(tof.get_distance(), "mm")
tof.stop_ranging()

Sources: VL53L1X Python library (Pimoroni), Raspberry Pi GPIO pinout

Analog

Analog — light level on a Raspberry Pi Pico

An LDR module's analog output goes straight to one of the Pico's ADC pins. No extra converter is needed on a Pico.

Parts

Wiring

  • VCC → 3V3(OUT), pin 36GND → GND, pin 38
  • AO → GP26 (ADC0), pin 31DO → not used

Set it up

  1. Install MicroPython on the Pico (hold BOOTSEL and plug it in, then copy the MicroPython file onto it).
  2. Wire the module as above with jumper wires. The Pico H has its headers fitted.
  3. Run the example below in Thonny. Cover the sensor and watch the number change; note dark and bright readings to set your own threshold.
from machine import ADC
import time

light = ADC(26)  # GP26 is ADC0
while True:
    print(light.read_u16())  # 0 to 65535
    time.sleep(1)

Sources: Raspberry Pi Pico documentation, MicroPython ADC (machine.ADC)

Sensors for Raspberry Pi for Raspberry Pi 4

Filter (1 on)

Guides & code

Maddy from the Pi Australia team

Need help? We're here for you!

Hi, I'm Maddy. My team and I are ready to help with your order or any questions.