int LED = 13;
void setup()
{
Serial.begin(9600);
pinMode(LED,OUTPUT);
}
void loop()
{
unsigned int val;
unsigned int dat;
val=analogRead(0);
dat=(500 * val) /1024;;
Serial.print("Temp: ");
Serial.print(dat);
Serial.println(" C");
if(dat>25)
{
digitalWrite(LED,HIGH);
}
else
{
digitalWrite(LED,LOW);
}
delay(500);
}