I'm reading temp. in Celsius with a TEMP 36 chip. Now I would like to do the following but I have no clue, I'm just new with arduino. I'm trying to display in the serial monitor a text that says "temp is ok" when temp is between 20 and 50 celsius, and change that text to "high temp" when temp is higher than 55 celsius. Can someone give me a clue on how to achieve this? this is my code:
//Reading temp sensor TMP36
void setup () {
Serial.begin(9600);
}
void loop () {
float potvalue=analogRead(A0);
float voltage=(potvalue * 5)/1023;
Serial.print(voltage); Serial.println("volts");
//temp C
float tempC=(voltage-.5) * 100;
Serial.print(tempC); Serial.println("celcius");
delay(1000);
}