Did not find something obvious on code review. Don't have such I2C LCD, so can't run code here.
There are printout of exceptions in the code, what is the output from this ?
To find the root cause, I would - for tests - remove the DHT readings and keep the LCD, then allow DHT, but remove LCD.
As already proposed, remove the reset_lcd() function for these tests.
Example DHT removal:
instead ofuseFor the LCD removal, just replace the calls to LCD object with print statements.
There was a remark on "Ive trie all lengths of cables to make sure it's not noise etc. ". How long are wires from DHT22 to pico, and from pico to LCD?
There are printout of exceptions in the code, what is the output from this ?
To find the root cause, I would - for tests - remove the DHT readings and keep the LCD, then allow DHT, but remove LCD.
As already proposed, remove the reset_lcd() function for these tests.
Example DHT removal:
instead of
Code:
dht_device.measure() temperature_c = dht_device.temperature() humidity = dht_device.humidity()
Code:
# dht_device.measure() import random temperature_c = 22.0 + random.random() * 5 humidity =44.0 + random.random() * 5
There was a remark on "Ive trie all lengths of cables to make sure it's not noise etc. ". How long are wires from DHT22 to pico, and from pico to LCD?
Statistics: Posted by ghp — Sat Feb 01, 2025 9:43 pm