Created
November 5, 2014 11:06
-
-
Save anonymous/4133ad12cce2f71ea3dc 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 () { | |
analogReference(INTERNAL); | |
} | |
void writeTemp(float temp) { | |
EEPROM.write(EAdress, temp); | |
EAdress += 4; | |
} | |
void loop () { | |
reading = analogRead(tempPin); | |
tempC = reading / 9.31; | |
writeTemp(tempC); | |
delay(15 * 60 * 1000 / 30); // 15 minutes * 60 seconds * 1000 milliseconds / 30 seconds | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment