I want to read the data from a Pimoroni LTR-559 sensor but it only returns None in the code.
Here is the code:
import time
from pimoroni_i2c import PimoroniI2C
from breakout_ltr559 import BreakoutLTR559
PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5}
PINS_PICO_EXPLORER = {"sda": 20, "scl": 21}
i2c = PimoroniI2C(sda = 4, scl = 5)
ltr = BreakoutLTR559(i2c)
while True:
reading = ltr.get_reading()
print(reading)
if reading is not None:
print("Lux:", reading[BreakoutLTR559.LUX], "Prox:", reading[BreakoutLTR559.PROXIMITY])
time.sleep(0.1)
and for the pinout:
| Pico | LTR559|
| -------- | -------------- |
| 3V3(Pin36) | Power |
| GND (Pin38) | GND |
| SDA1 (Pin4) | SDA |
| SCL1 (Pin5) | SCL |
I ignored the int pin because I don't think it's necessary, is that the issue or did I get something else wrong?
print(ltr.part_id())? Also, have you tryPimoroniI2C(**PINS_BREAKOUT_GARDEN)? \$\endgroup\$