Created
December 31, 2014 02:13
-
-
Save not-for-me/250af8d876e6d494632f 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 tempC; | |
int reading; | |
int tempPin = 0; | |
void setup() | |
{ | |
Serial.begin(9600); | |
analogReference(INTERNAL); | |
} | |
void loop() | |
{ | |
reading = analogRead(tempPin); | |
tempC = reading / 9.31; | |
Serial.print("Temp: "); //Display the temperature on Serial monitor | |
Serial.print(tempC); | |
Serial.println("C"); | |
delay(2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment