Hi,
When I use only one analog input in my project, everything is alright. ADC is working well.
When I try to read multiple analog inputs in a raw, that doesnt work !
Every single analog input is Ok with my Arduino Due Board. Tested one by one with Analog exemple.
Here is a program that doesn’t work with me :
int sensor_pins[] = {A2, A3, A4, A5, A6, A7, A8, A9};
void setup() {
Serial.begin(57600);
}
void loop() {
for(int i=0; i<8;++i)
{
Serial.print(analogRead(sensor_pins[i]));
Serial.print(' ');
}
Serial.println();
delay(10);
}
Either this code returns the same value for every inputs (oneinput seems to be cloned), or (in another project) it returns wrong inputs (and every readings are about the same wrong value).
Strange, isn’t it ! I tried to add a delay between analogReads. Not better ! I though that the DUE had bot enough time to switch from one input to the next one.
Any idea ?
Thanks,
X.