Hi. I have written a small sketch that lights a red LED and sounds a buzzer when the temperature in a chest freezer goes above a certain temperature. The alarm works fine, except it fails at irregular intervals. It might work for 2 hours or 2 weeks before failing. When it fails, the buzzer sounds even though the DHT’s temperature is still below the threshold setting. I have replaced every component, including the Nano, the DHT and the power supply, to no avail. Any suggestions as to what I can try next would be welcome. Sketch attached. Thanks.
FreezerAlarm20_nocomments.ino (1.05 KB)