Last active
July 4, 2019 08:47
-
-
Save sachendra003/7b93705b5c5d3dfd3621d26b988e507a to your computer and use it in GitHub Desktop.
Temperature Monitoring on Smartphone
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
#include <Adafruit_Sensor.h> | |
/* | |
1. Go to sketch | |
2. Go to Manage Libraries | |
3. Install Adafruit unified sensor | |
4. Add that Adafruit unified sensor file | |
*/ | |
int i = 0; | |
float temp = 0; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
i = analogRead(A0); // analog pin A0 | |
temp = (i/1024.0)*500; | |
Serial.println(temp); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment