Hello all,
See the code below. The program should OP raw adc value, along with calculated Voltage value. the first returns 820, 821 etc, the latter keeps returning 0.0000
Any idea?
float voltage ;
int sensorValue ;
void setup()
{
Serial.begin(9600);
}
void loop()
{
sensorValue = analogRead(A5);
delay(20);
voltage = sensorValue/1023 ;
voltage = 5 * voltage ;
Serial.println(sensorValue,DEC);
Serial.println(voltage, 4);
delay(2500);
}