Last active
July 10, 2018 15:29
-
-
Save li2hub/b7b9822660f252678e0dfdbf3f007d96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float temp; | |
int tempPin = 0; | |
void setup() | |
{ | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
temp = analogRead(tempPin); | |
temp = temp * 0.48828125; //convert into celcius | |
Serial.print(“TEMPRATURE = “); | |
Serial.print(temp); | |
Serial.print(“*C”); | |
Serial.println(); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment