1. Click the code editor button to open the coding panel.
We will code to read the temperature in Celsius & Fahrenheit and if the temperature is greater than the threshold value then the Led’s will glow.
First we will make a variable named as “temp” to store the value coming from the temperature sensor i.e connected to A0 pin of arduino.
Then convert the temperature into Fahrenheit by using the formula and store it in the variable named as Fahrenheit.
Now, print temperature values in the serial monitor using print to serial block.
Then put the condition that if the temperature is lesser than threshold value i.e. 50 then all the led will turn off and if then value is greater than 50 then all the led’s will glow.