Trying to turn off an led when temp is reached. (using dht22)

I see you have a solution, but I though I might explain a bit.

When you ask to compare a variable being equal to a constant number you run the risk of the input temperature jumping 2 degrees, which if at the wrong time could complete bypass your if condition. So its always better to use < or <= ( > or >=) for comparison.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.