Closed gregwa1953 closed 2 years ago
How do you creates your I2C bus on the ESP8266 ? Is it defined accordingly to the wiring ?
What is the I2C address declared on by the board manufacturer ? The library do use 0x1D (29) as default address. You can try to make an i2c_instance.scan() to check for the I2C devices used on the bus.
The wiring of the esp8266 is scl=Pin(5), sda=Pin(4)
The I2C addresses of the board are 0x19 and 0x1e
I've also tried this library on a Raspberry Pi Pico (using Micropython 1.17) and is fails at the same place.
Hi,
Your board is certainly configured to use the 0x1E address instead of the default one (0x1D).
I just uploaded a new version of the lib accepting the parameter address in the constructor (behind the i2c reference).
Just write lsm= LSM303( i2c, address=0x1E )
instead of lsm = LSM303( i2c )
... it should work better.
Thank you very much.
I'll give that a shot.
I'm using Thonny as my IDE. ESP8266 running MicroPython v1.18 on 2022-01-17; ESP module with ESP8266 Trying to run either of the three example programs all give the same result...
Any suggestions?