Quantcast
Viewing all articles
Browse latest Browse all 4878

MicroPython • Re: Error connecting LIS3DH to Raspberry Pi Pico W

If I read the source correctly, the library you're using sets up I2C on pins 8 and 9, while you're using the standard I2C0 pins, 4 and 5. Try instantiating the device as:

Code:

motion = PiicoDev_LIS3DH(bus=0, sda=Pin(4), scl=Pin(5))
Oh, and don't forget to add:

Code:

from machine import Pin
in the beginning.

Statistics: Posted by horuable — Thu Oct 24, 2024 2:22 pm



Viewing all articles
Browse latest Browse all 4878

Trending Articles