Hello,
In an arduino mega analog pins are consistently displaying value with no hardware connected.
Test code is below, with serial monitor results.
All pins have this behavior of reading values ~300 without input.
I am expecting zero, any hints?
Is something broken?
Thanks, cnash.
/TESTCODE/
const int Pin1 = 3;
int ANALOG_PRESS_LEVEL = 0;
void setup() {
Serial.begin(2400);
Serial.print("ALIVE_#");
}
void loop(){
ANALOG_PRESS_LEVEL = analogRead(Pin1);
Serial.print(ANALOG_PRESS_LEVEL,DEC);
Serial.print(", ");
delay(1000);
}
/OUTPUT/
ALIVE_#390, 335, 329, 327, 325, 324, 324, 324, 323, 323, 323, 324,