1
I am starting in Python, with the following characteristics: -User enters temperature limit -I read the user temperature compared to the sensor temperature -If Sensor Temperature is > User Sensitivity Activates Cooler and lights Red LED Or you’ll light green Leds. -Loop is interrupted by Ctrl+C Keyboardinterrupt
Questions according to the code below: Because the Leds are not lighting in any condition ? But I know they work, because I have already tested in another code. Because when I run the code for the first time, I enter the value that activates the cooler, I interrupt with Ctrl+C. Next when I run the code again the cooler turns on again without entering any value as if the value of the variable was not cleared before ? I tried to use del to delete the variable but it didn’t solve.
Regarding the LED solved flaw in my logic where I called and in the same second delisgava the LED. But I still can’t solve the variable problem.
– Rodrigo Leme