I am having some major issues with my Arduino Yun.
When attempting to read a value from the analog pins, the Yun is giving me incorrect constant values.
I have attached everything to a common ground, and I am supplying 3.3 volts to the A0 pin on the Yun.
The weird thing is, the pins all give constant values in ascending order, no matter what is connected to them, or if nothing is connected at all.
- A0 - 18
- A1 - 19
- A2 - 20
- A3 - 21
- A4 - 22
- A5 - 23
The code I am running is a very simple script.
float i;
void setup()
{
Serial.begin(9600);
}
void loop() {
i = A0;
Serial.println(i);
delay(1000);
}