Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4814

General • Re: Noob help with power cycle

$
0
0
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 of

Code:

        dht_device.measure()        temperature_c = dht_device.temperature()        humidity = dht_device.humidity()
use

Code:

        # dht_device.measure()        import random        temperature_c = 22.0 + random.random() * 5        humidity =44.0 + random.random() * 5
For 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?

Statistics: Posted by ghp — Sat Feb 01, 2025 9:43 pm



Viewing all articles
Browse latest Browse all 4814

Trending Articles