Closed jknappatdirigible closed 2 years ago
@caternuson this is due to the LTR390 not acking the reset bit, @hathach just fixed this in arduino - most sensors don't just give up the ghost in the middle of a transaction :/ dupe of https://github.com/adafruit/Adafruit_CircuitPython_LTR390/issues/6
from my testing with arduino after soft reset()
other mcus may/may not recover, though I think the "best-to-all" solution is just re-init I2C within the soft-reset, just to be safe. This can be done easily with arduino by calling end() then begin() https://github.com/adafruit/Adafruit_LTR390/pull/3/files#diff-2e600839f345eb79c6af9a2d512e9b212072006ae371f58f2817b6e60538a7f3R92
@hathach thanks for the input. i was thinking same here:
though I think the "best-to-all" solution is just re-init I2C within the soft-reset
I'll setup and test that on various MCU's and see how it plays.
Please try the 1.1.3 release: https://github.com/adafruit/Adafruit_CircuitPython_LTR390/releases/tag/1.1.3
This worked for me. Thank you for the quick fix, @caternuson
I am trying to integrate the LTR390 with a Feather RP2040 but the device is failing to initialize. I am running Circuitpython 7.0.0 (adafruit-circuitpython-adafruit_feather_rp2040-en_US-7.0.0.uf2) and using the libraries from the latest Circuitpython bundle (adafruit-circuitpython-bundle-7.x-mpy-20211127).
The code I am running is as follows:
And the error I'm receiving is:
I have also attached a photo of my setup. You may notice that there are other sensors and boards connected to the Feather RP2040, but I have tried connecting the LTR390 directly to the RP2040 via STEMMA QT Cable. This didn't produce any positive change, however. Other things I have tried include:
I have managed to get the code to execute successfully with a Feather M0 RFM95 LoRa Radio, so the problem appears to be specific to the RP2040.
Hope you can make more sense of this than I have so far. Please let me know if I can provide any additional info.