I am trying to connecting PiicoDev 3-Axis Accelerometer LIS3DH to a Raspberry Pi Pico W. I have the latest UF2 file and am using the code from this repository:
I get the following error when I try to run any of the examples:
PiicoDev could not communicate with module at address 0x19, check wiring
Traceback (most recent call last):
File “”, line 14, in
File “PiicoDev_LIS3DH.py”, line 101, in init
File “PiicoDev_LIS3DH.py”, line 88, in init
File “PiicoDev_LIS3DH.py”, line 111, in deviceID
OSError: [Errno 5] EIO
When I print out results of i2c.scan() the device appears in the list:
Result of i2c scan: 0x19
And the green led on the board itself is on so I assume it’s not a connection issue. Any advice on how to proceed would be much appreciated. I’m at a bit of a loss of where the problem lies. Thank you!
Hi Vanessa
I don’t know much about RPi devices or the PicoDev device but the bit I do note is that the common denominator here is the “PiicoDev_LIS3DH.py” statement
I first thought that it might have been the double “i” but is seems like I have been spelling “PicoDev” wrong all this time. Must be something else.
Just a thought.
Cheers Bob
Hi Liam, thank you for the welcome! It’s all very perplexing. I’ve attached an image of the setup. I also tried the example with a different accelerometer and cable and I get the same result.
Thanks for sending that through. Its odd that you’re getting this result. If you flip the switch and change the address in the PiicoDev_LIS3DH.py file to 0x18 do you still get the issue? Do you have another Pico that you can try on?
It is weird. I re-uploaded the UF2 file to see if that would help anything and it’s working now! I have no idea what was causing the issue in the first place.
I’m going to wait and see if the problem comes up again.