Temperature monitoring: Try block is not getting executed

This is my code.

And this is my output:

Even if my sensor value is out of limit, try block is not getting executed.
Please help

Your sensor values seem pretty much in range try to get the temperature value below 300F…try to sense the temperature near the refrigerator to get values belore 300F.
your code seems to be right but the execution and test value u giving should be modified

1 Like

Your sensor values are within the range of 300-600 hence the code is being executed correctly. To get an SMS alert you can change the minimum_limit from 300 to 400 so any temperature below 400 will prompt an SMS.

1 Like

Uuggh, what a silly question I was asking :grimacing:
I didn’t notice that. Thanks :slightly_smiling_face:

2 Likes