PyRaspBeta

← All practice problems

Raspberry Pi practice problem · I²C, SPI, UART & 1-Wire

Two IMUs, one bus

EasyBudget $16Python · gpiozero

Two identical chips can't share an address. The MPU-6050 has an AD0 pin for that: to GND it answers at 0x68, to 3V3 at 0x69.

Build: two MPU-6050s on the I²C pins, both powered from 3V3. One has AD0 to GND, the other AD0 to 3V3.

Program: read the WHO_AM_I register (0x75) of both addresses and print:

0x68 says 0x68
0x69 says 0x68

(WHO_AM_I holds the chip's default address, so both answer 0x68 — the pin only moves where the chip listens.)

More in I²C, SPI, UART & 1-Wire