Question

I am working on Arduino UNO. I am stuck at a point where I need to turn on the ADC pins on it. Please help me out, I am new to Arduino.

Was it helpful?

Solution

by default the A0-5 pins are HiZ input and ready to sample their A2D's. You need to simply sample them whenever you want.

...
int sensorValue0 = analogRead(A0);
int sensorValue1 = analogRead(A1);
int sensorValue2 = analogRead(A2);
int sensorValue3 = analogRead(A3);
int sensorValue4 = analogRead(A4);
int sensorValue5 = analogRead(A5);
...

OTHER TIPS

Input analog pins default to being on and ready to be read. See http://playground.arduino.cc/CourseWare/AnalogInput for some general information and http://www.arduino.cc/en/Tutorial/Potentiometer for a specific example. Note that an Arduino Uno (using the Atmega328P chip) has six analog input pins, 0 to 5.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top