Skip to main content

IOT Experiment -4

  IOT Experiment -4

READ TEMPERATURE AND DISPLAY ON SERIAL MONITOR USING ARDUINO UNO

SORCE CODE:


float temp;
int temppin=0;

void setup(){
  Serial.begin(9600);
}
void loop(){
  temp = analogRead(temppin);
  temp=temp * 0.48828125;
  
  Serial.print("temperature=");
  Serial.print(temp);
  Serial.print("*C");
  Serial.println();
  delay(1000);
}

Comments