Go Down

Topic: AnalogRead (Read 2389 times) previous topic - next topic


Reference says that AnalogRead returns int value. Unit value represents 4.9 mV, so if I want mV value i use:
float millivolt = analogRead(A1) * 4.9;

Is that true also with Arduino Due?

I'm trying to read TMP36 temperature sensor value, but I can not get the right value. The code is:

   float temp = analogRead(A1) * 4.9;
   temp = (temp - 500) / 10;


Is that true also with Arduino Due?

This is because the Due has a 3V3 reference voltage not a 5V one. So each step will be 3.3 / 1024 = 3.22mV

Go Up