TMP36 Sample Code
TMP36 Sample Code
float temp;
int tempPin = 0;
void setup()
{
Serial.begin(9600);
}
void loop()
{
int reading = analogRead(tempPin);
// converting that reading to voltage,
float voltage = reading * 5.0;
voltage /= 1024.0;
// print out the voltage
Serial.print(voltage);
Serial.print(" volts");