---
agent:
  instructions: "Use this search API to find relevant content across this site (products with prices and stock, collections, guides, articles, courses, help and pages) with keywords or natural-language queries, instead of crawling individual pages. Replace {query} with your URL-encoded query. Results are returned in Markdown."
  endpoint: "https://piaustralia.com.au/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Qwiic and STEMMA QT connectors

The small 4-pin I2C plug used by SparkFun Qwiic and Adafruit STEMMA QT boards, how chaining and I2C addresses work, how it differs from Grove, and how to connect it to a Raspberry Pi or a Pico.

## What it is

Qwiic (SparkFun) and STEMMA QT (Adafruit) are two names for the same idea: a tiny, keyed 4-pin plug that carries an **I2C** bus and power between boards, so you can connect sensors, displays and controllers without soldering or breadboard wiring. Other makers use it too; Pimoroni calls it Qw/ST.

The plug is a **JST SH**, 1.0 mm pitch. It's polarised, so it only goes in one way round, and both systems use the same pins in the same order:

| Pin | Signal | Wire colour |
|---|---|---|
| 1 | GND | black |
| 2 | V+ (power) | red |
| 3 | SDA (data) | blue |
| 4 | SCL (clock) | yellow |

Because the plug and pinout match, Qwiic and STEMMA QT boards work together on the same cable.

## 3.3 V, mostly

- **Qwiic** is a 3.3 V system. SparkFun's rule is that every Qwiic board runs at 3.3 V on the connector, with any conversion done on the board.
- **STEMMA QT** allows 3 to 5 V on V+. Adafruit's STEMMA QT boards carry their own regulator and level shifting, so they're happy on either voltage.

On a Raspberry Pi or a Pico, keep the bus at **3.3 V**. The GPIO pins on both are 3.3 V only, and a 3.3 V bus suits every Qwiic and STEMMA QT board.

The cable's thin wires are fine for sensors. SparkFun gives about 226 mA as a conservative limit for power through a Qwiic cable, so anything power-hungry should get its own supply.

## Chaining boards together

Most boards have two connectors, one in and one out, so you can daisy-chain several devices from a single port. Every board on the chain shares the same two I2C wires, and the controller tells them apart by **address**.

Practical limits:

- **Length.** I2C is designed for short distances. SparkFun reports reliable runs past a metre; a couple of metres in total is a sensible ceiling without special hardware.
- **Pull-up resistors.** I2C needs pull-up resistors on SDA and SCL, and most breakout boards include their own. With many boards on one chain these add up. Many SparkFun boards have a jumper you can cut to disconnect that board's pull-ups if a long chain misbehaves.

## I2C addresses and clashes

Every I2C device answers to a 7-bit address, written in hex, such as `0x44`. The address is usually fixed by the chip, which is fine until you want **two of the same sensor**: two devices with the same address on one bus will both answer and corrupt each other.

Ways around it, roughly in order of ease:

1. **Address jumper or pin.** Many boards have a solder jumper or pad that moves the chip to an alternative address. Check the board's documentation.
2. **Change it in software.** Some chips let you set a new address, though it's often forgotten at power-off.
3. **An I2C multiplexer** such as the TCA9548A. It sits on the bus at its own address and switches between several downstream branches, each of which can hold a device with the clashing address.
4. **A second bus.** The Pico has two I2C controllers, so each copy of the sensor can have its own.

## Connecting to a Raspberry Pi

The Pi's I2C bus is on header pins 3 (SDA, GPIO2) and 5 (SCL, GPIO3), with 3.3 V on pin 1 and ground on pin 6. GPIO2 and GPIO3 already have pull-up resistors on the Pi. Ways to get a Qwiic socket:

- **Qwiic SHIM:** a thin board that pushes over the GPIO header by friction, adding one connector while leaving room for a HAT on top.
- **Qwiic pHAT:** a board that sits on the header with four connectors.
- **A Qwiic or STEMMA QT cable with female jumper ends**, plugged onto pins 1, 3, 5 and 6.

## Enabling I2C on Raspberry Pi OS

I2C is off by default. Turn it on with either:

- **Desktop:** Preferences > Control Centre (Raspberry Pi Configuration on Bookworm) > Interfaces, then switch on I2C.
- **Terminal:** `sudo raspi-config`, then **Interface Options > I2C**, and answer Yes.

Then check what's on the bus:

```
sudo apt install i2c-tools
i2cdetect -y 1
```

`i2cdetect` prints a grid of addresses. Each device that answers shows its address in hex; `UU` means a kernel driver is already using that address. If nothing appears, check the cable is seated and I2C is enabled.

## Connecting to a Pico

The Pico itself has no Qwiic socket, so use a cable with male header pins on one end into a breadboard, wired to:

| Cable | Pico pin |
|---|---|
| Red (V+) | 3V3(OUT), pin 36 |
| Black (GND) | any GND, such as pin 38 |
| Blue (SDA) | GP4, pin 6 |
| Yellow (SCL) | GP5, pin 7 |

GP4 and GP5 are MicroPython's default pins for I2C bus 0, so scanning is two lines:

```python
from machine import I2C
i2c = I2C(0)                         # SDA on GP4, SCL on GP5
print([hex(a) for a in i2c.scan()])  # e.g. ['0x44']
```

Some Pico-sized boards, such as the Pimoroni Pico Plus 2 W, have a Qw/ST socket built in.

## Qwiic versus Grove

Grove, from Seeed Studio, is a different and larger 4-pin connector. It doesn't plug into a Qwiic socket, and its I2C pins run in the opposite order: SCL (yellow), SDA (white), VCC (red), GND (black). Grove modules may run at 3.3 V or 5 V, so check before connecting one to a 3.3 V Qwiic bus. Adapter cables between Grove and Qwiic exist. Adafruit's original STEMMA (without "QT") uses a larger 2 mm JST PH plug instead, so it doesn't fit a Qwiic socket either.

## Parts in this guide

- [SparkFun Qwiic SHIM for Raspberry Pi](https://piaustralia.com.au/products/sparkfun-qwiic-shim-for-raspberry-pi.md)
- [SparkFun Qwiic pHAT V2.0 for Raspberry Pi](https://piaustralia.com.au/products/sparkfun-qwiic-phat-v2-0-for-raspberry-pi.md)
- [SparkFun Qwiic pHAT Extension for Raspberry Pi 400](https://piaustralia.com.au/products/sparkfun-qwiic-phat-extension-for-raspberry-pi-400.md)
- [Pimoroni Pico Plus 2 W](https://piaustralia.com.au/products/pimoroni-pico-plus-2-w.md)
- [Adafruit MS8607 Pressure Humidity Temperature PHT Sensor - STEMMA QT / Qwiic](https://piaustralia.com.au/products/adafruit-ms8607-pressure-humidity-temperature-pht-sensor-stemma-qt-qwiic.md)
- [SparkFun CO₂ Humidity and Temperature Sensor - SCD41 (Qwiic)](https://piaustralia.com.au/products/sparkfun-co-humidity-and-temperature-sensor-scd41-qwiic.md)

Written by Pi Australia from SparkFun Qwiic Connect System, Adafruit, Introducing STEMMA QT, Adafruit, I2C addresses, SparkFun, I2C tutorial, Seeed Studio, Grove system, Raspberry Pi's interface configuration documentation, MicroPython quick reference for the RP2.
