Enable I2C in the configuration tool, then run i2cdetect -y 1 and look for an address in the table.
What the message means
The interface is off by default. With it off, or with the wrong pins, the scan shows only dashes.
Fix it in this order
- Enable I2C in the Pi configuration tool, then reboot.
- Install the i2c-tools package if the command is missing.
- Wire SDA to GPIO 2 and SCL to GPIO 3 (physical pins 3 and 5), with power and ground.
- Run i2cdetect -y 1 and read the address that appears.
- Check the module voltage. The Pi pins are 3.3 V.
- Check pull-ups on the module if the bus is long.
Why it happens
The I2C bus is switched off in the default setup, so with it off there is nothing for the scan to talk to and every address shows as a dash. A device that is wired correctly and powered then looks the same as no device.
I2C devices answer to a fixed address, and the scan simply tries each address and records which ones reply. A missing reply points to the interface setting, the wiring of the two signal lines, power, or a device that has a different address from the one you expected.
If you see this, do this
| You see | Do this |
|---|---|
| All dashes | Not enabled, or wiring. |
| Address shows but code fails | Wrong address or bus number. |
Related
Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.
Why this happens
I2C on the Pi uses GPIO 2 for SDA (physical pin 3) and GPIO 3 for SCL (physical pin 5). The bus is off by default, so the device file /dev/i2c-1 does not exist until it is enabled in raspi-config or in the boot configuration file. The Pi also has 1.8 kΩ pull-up resistors to 3.3 V on those two pins, so the bus idles at 3.3 V, and a module that adds pull-ups to 5 V can push a higher voltage onto the Pi’s pins.
i2cdetect sends an address and reports whether a device acknowledged. A dash means no acknowledgement and the letters UU mean a driver in the kernel has already claimed that address. So ‘no devices’ means either the bus is not on, the wiring does not reach the device, or the device is powered wrongly.
How to confirm the cause
- Run
ls /dev/i2c*. If /dev/i2c-1 is absent, the interface is not enabled or the tools were run on the wrong bus. - Run
sudo i2cdetect -y 1. On current models the user bus is number 1. - Measure the module’s supply and ground with a meter and check its logic voltage is 3.3 V compatible.
- Swap SDA and SCL in turn; a swapped pair is the most common wiring slip.
- Look at the module’s address pins or solder jumpers; a changed address will show somewhere other than the usual one.
Worked example
Enable the bus, install the tools and scan. An MPU6050 at its default address would show as 68; many small OLED displays show 3C.
sudo raspi-config # Interface Options > I2C > enable
ls /dev/i2c* # expect /dev/i2c-1
sudo apt install -y i2c-tools
sudo i2cdetect -y 1
# 0 1 2 3 4 5 6 7 8 9 a b c d e f
# 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --Common mistakes
- Using bus 0 on a current Pi.
- Powering the module from 5 V with pull-ups to 5 V on the signal lines.
- Long jumper wires on a fast bus.
- Not sharing a ground between the Pi and an external supply.
- Not rebooting after enabling the setting where the guide requires it.
If this did not fix it
- Address conflicts or a device with a different default address.
- A device that stretches the clock, which the Pi’s hardware can handle badly at default speed; lower the bus speed.
- A damaged or fake module.
- Missing pull-up resistors on a bare chip.