Page 8 - S.Shafna (1B), 2207, Ass-1
P. 8
❖ Circuit
❖ Arduino codes
int TempSensor=A0;
int val=0;
void setup(){
Serial.begin(9600);
pinMode(TempSensor,INPUT);
}
void loop(){
float mv=(val/1024.0)*5000;//value convert to minivolt as digital
value, if multiply by 5 it recieved volt
float cel =mv/10;// 10 milli volt = 1 celcious
float farh=(cel*9)/5+32;// if want to convert kelvin
val=analogRead(TempSensor);
Serial.print("TEMPRATURE =");