Personal I'm starting in Python, with the following features: -User enters with temperature limit -It read the user temperature compared to the sensor temperature -If Sensor Temperature is > User Temeratura Turns on Cooler and lights Red LED Otherwise, the green LED will light up. -The loop is interrupted by Ctrl + C KeyboardInterrupt
Questions according to the code below: Why are the LEDs not turning on in any condition? But I know they work, because I already tested it 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. Then when I re-run the code the cooler turns on again without entering any value as if the value of the variable had not been cleared before? I already tried using del to delete the variable but it did not solve.