Skip to content

Instantly share code, notes, and snippets.

@itsbalamurali
Created February 8, 2015 13:09
Show Gist options
  • Save itsbalamurali/941b746d5eeac0ff3476 to your computer and use it in GitHub Desktop.
Save itsbalamurali/941b746d5eeac0ff3476 to your computer and use it in GitHub Desktop.
float temp;
int tempPin = 0;
void setup()
{
Serial.begin(9600);
}
void loop()
{
temp = analogRead(tempPin);
temp = temp * 0.48828125;
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