Hi all,
I have a little project where I want to use a temperature sensor to check if the temperature in the fridge is too low too high or within normal range and light LEDs accordingly.
I am struggling with the conditional loop to figure out which LED to light out. I would like to light up the LOW indicator if the temperature is between say -30C and 0C, light up the NORMAL indicator if temperature is between +1C and +6C, light up the HIGH indicator if temperature is between +7C and above and light up the LOW and HIGH if it is outside of these ranges.
I guess I could do it with an if() statement but I would like to know if there is a cleaner way of doing this?
Thanks!