I have an enviroweather board that has been a bit error prone recently, so I did a flash_nuke.uf2 and then flashed pimoroni-enviro-v1.22.2-micropython-enviro-v0.2.0.uf2.
That worked to start with, but after three or four readings I got a flashing red light.
I looked at the log.txt file.and found the following :
2024-12-05 19:45:03 [debug / 124kB] > taking new reading
2024-12-05 19:45:03 [info / 120kB] - seconds since last reading: 300
2024-12-05 19:45:03 [exception / 115kB] ! Traceback (most recent call last):
File "main.py", line 71, in <module>
File "enviro/__init__.py", line 411, in get_sensor_readings
File "enviro/boards/weather.py", line 198, in get_sensor_readings
TypeError: 'NoneType' object isn't subscriptable
2024-12-05 19:45:03 [info / 138kB] > going to sleep
Line 198 of weather.py is :
"luminance": round(ltr_data[BreakoutLTR559.LUX], 2),
Is there a solution to this problem ?
If you need any more info I will be happy to supply it.
Thanks.