1

I need to read 5 analog pins simultaneously , is it possible?

note that:
analogRead(1);
analogRead(2);
analogRead(3);
will not work this case

Omar Faruk
  • 11
  • 1
  • 1
    on the UNO (mega should be same) the analogRead(x); takes about 500us to complete. So depending upon the reaction speed of the signals that may be sufficient. You need to ask yourself what is the precision of time you consider to be simultaneous. If you are only looking at sampling everything once a Kilo Hertz (give or take) then back to back reads may be sufficient. – mpflaga Jan 23 '15 at 21:11
  • Why won't the code given work? – tstew Jan 24 '15 at 02:53

1 Answers1

3

No, it is not. The ADC in the MCU is only capable of sampling a single analog channel at a time.

If you require sampling more than one channel at a time then you will need to use one or more external ADCs that are capable of sampling multiple channels, or multiple ADCs each dedicated to a single channel.

Ignacio Vazquez-Abrams
  • 17,663
  • 1
  • 27
  • 32