Make a LM 35 more specific ?

Hi,

Does anyone know if i can make a LM 35 temp sensor more specific, so as that it can go into decimal points of degrees ?

So far i have the very basic code of returning the temp in celsius, but i need it be more specific.

float tempC;
int tempPin = 0; //temp sensor plugged in port 0

void setup()
{
Serial.begin(9600); // opens serial port coms BTW unit and PC
}

void loop ()
{
tempC = analogRead(tempPin); //takes the temp
tempC = (5.0tempC100.0)/1024.0; // takes temp to Cel
Serial.println((byte)tempC);
delay(1000);
}

Change

 Serial.println((byte)tempC);

To

 Serial.println(tempC);

THANKS !
That was a stupid mistake

you can merge these two lines to one single expression

tempC = analogRead(tempPin); //takes the temp
tempC = (5.0tempC100.0)/1024.0; // takes temp to Cel

tempC = analogRead(tempPin) * 0.48828125; // way faster as it is only one operation -- division is expensive!

Serial.begin(9600); // why not 115200 12x faster

you will need speed in some future :wink: