LIS3DH not at address 0x19

I hooked up the PiicoDev RP2040 to LIS3DH using qwiic cable. I was able to run the *.py code and it told me there was nothing at 0x19 (the address shown in the learning video). What is broken? Software or LIS3DH or I2C pins on the RP2040? I will hook up a logic analyzer to the qwiic and watch the traffic. I looked at the unified.py code and it works with microbit, Linux, and EP32. Maybe the EP32 also works with RP2040? But it looks like EP32 code is stubbed out.
elif bus is None and sda is None and scl is None:
self.i2c = I2C(0, scl=Pin(9), sda=Pin(8), freq=freq) # RPi Pico in Expansion Board
else:
raise Exception(“Please provide at least bus, sda, and scl”)

2 Likes

When I had to debug i2c for the first time @Jeff105671 dirrected me to i2c scanning which helps find valid addressed on your o2c bus.

Have a try and see if you can locate it :grinning:

2 Likes

Hey @Wade282079, welcome to the forums!

The LIS3DH board has a switch on it to change the I2C address between 0x19 (OFF position) and 0x18 (ON position). Could this switch be in the wrong position?

Otherwise, I second what @Pixmusix has said, I2C scanning tools are fantastic for troubleshooting this kind of thing and should really be your first install before using an I2C device to help out with issues like this.

Hope this helps! :slight_smile:

On the video he emphasized being in the off position, and it is. So I’ll look for what it really is and see what is going on.

2 Likes

Use an I2C scanner script on the RP2040 to confirm what devices are visible on the bus.