Skip to content

Instantly share code, notes, and snippets.

@ludovicfrin
Created March 28, 2016 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ludovicfrin/35a8ca1afea875bfeb43 to your computer and use it in GitHub Desktop.
Save ludovicfrin/35a8ca1afea875bfeb43 to your computer and use it in GitHub Desktop.
float temperature;
int reading;
int pin = 5;
void setup()
{
analogReference(INTERNAL);
Serial.begin(9600);
}
void loop()
{
reading = analogRead(pin);
temperature = reading / 9.31;
Serial.println(temperature);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment