Created
July 3, 2018 06:14
-
-
Save penpencool/cb93b496662c20d6780d1fe048e3ce34 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
/* | |
Example for Arduino Uno | |
By ArduinoAll | |
- - Gnd | |
+ - 5V | |
Out - A5 | |
*/ | |
float tempC; | |
int reading; | |
int tempPin = A0; | |
void setup() | |
{ | |
analogReference(INTERNAL); | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
reading = analogRead(tempPin); | |
tempC = reading / 9.31; | |
Serial.println(tempC); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment