Ardunio DUE & LM35

Hi can't get Ardunio DUE & LM35 to work for me. Works great on MEGA-ADK board.
I get 91 Analog read & 41 degree C for first reading
then ZERO for all other readings

int potPin = 0; //input read pin for LM35 is Analog Pin 0
void setup()
{

  • Serial.begin(9600);*
    }
    *void loop () *
    {
  • int aRead = 0;*
  • aRead = analogRead(potPin);*
  • Serial.print("Analog = ");*
  • Serial.print(aRead);*

_ float tempC = (((aRead * 5000) / 1024.0) ) / 10.0 ;_

  • Serial.print(" Temp = ");*
  • Serial.println(tempC);*
  • delay(3000);*
    }

float tempC = (((aRead * 5000) / 1024.0) ) / 10.0 ;

I haven't used the Due yet but it's a 3v3 system, so wouldn't that value be 3300?


Rob

From Adafruit TMP36 tutorial:
Voltage at pin in milliVolts = (reading from ADC) * (3300/1024)
This formula converts the number 0-1023 from the ADC into 0-3300mV (= 3.3V)