Skip to content

Instantly share code, notes, and snippets.

@ludovicfrin ludovicfrin/lm35.ino
Created Mar 28, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.