Arduino Yun analogRead(.)

Greetings,

Just starting with my Yun. Was doing the AnalogReadSerial tutorial (read from analog pin connected to potentiometer and 5v pin).

Reading is only from 0-1000 on A0-A5. Why?

My uno I get full 10 bit resolution: 0-1023.

Just curious and thanks in advance!

Analog Inputs: A0 - A5, A6 - A11 (on digital pins 4, 6, 8, 9, 10, and 12). The Yún has 12 analog inputs, labeled A0 through A11, all of which can also be used as digital i/o. Pins A0-A5 appear in the same locations as on the Uno; inputs A6-A11 are on digital i/o pins 4, 6, 8, 9, 10, and 12 respectively. Each analog input provide 10 bits of resolution (i.e. 1024 different values).

https://www.arduino.cc/en/Main/ArduinoBoardYun

sonnyyu:
Apple to apple comparison:

Yun:

Analog Input Channels:12, 10 bit ADC channels
Analog Output Pins:0

Tian:

Analog Input Pins:6, 12-bit ADC channels
Analog Output Pins:1, 10-bit DAC

Tian is far better than Yun if you need analog I/O.

Analog Inputs: A0 - A5, A6 - A11 (on digital pins 4, 6, 8, 9, 10, and 12). The Yún has 12 analog inputs, labeled A0 through A11, all of which can also be used as digital i/o. Pins A0-A5 appear in the same locations as on the Uno; inputs A6-A11 are on digital i/o pins 4, 6, 8, 9, 10, and 12 respectively. Each analog input provide 10 bits of resolution (i.e. 1024 different values).

Thanks for the quote!! However, it does not answer my question because my Yun analog pins are only reading 1000 different values and the quote says it should read 1024.

So, why?

Stavros65:
Just starting with my Yun. Was doing the AnalogReadSerial tutorial (read from analog pin connected to potentiometer and 5v pin).
...

Your code and URL of AnalogReadSerial tutorial?

sonnyyu:
Arduino Yun 5v pin/USB port doesnt provide 5 volt.

Arduino Yun 5v pin doesnt give me 5v. - #6 by sonnyyu - Arduino Yún - Arduino Forum

4.48 volt at 5v pin will cause some shield fail, and low voltage at USB port cause a lot of USB device fail.

Arduino Yun release 5 is fixed 5v pin/USB port problem, provide exactly 5 volt which I saw the demo at maker faire nyc yesterday.

You do not have latest Yun release 5. The 5v pin has less than 5v!

Work around for old version Yun:

Jumper from the 3.3v pin to the AREF pin, read from analog pin connected to potentiometer and 3.3v pin

int analogPin = 3;    
int val = 0;          
void setup()
{
  Serial.begin(9600);          //  setup serial
  analogReference(EXTERNAL);
}
void loop()
{
  val = analogRead(analogPin);    // read the input pin
  Serial.println(val); // debug value
  delay(1000); 
}