I'm having trouble to read the voltage value of the potenciometer's wiper "leg".
I connected it to the 5V-GND of the Arduino, and connect the wiper into A0 analog pin. At 100ohms, I should have read 2.5V, but instead, I got 0,49V! I'm using [u]Matlab instead of IDE[/u]. I set the A0 pin in two different ways to see if it was a syntax error :
pinMode(A0,'input') and pinMode(14, 'input'); potencmt=a.analogRead(0);
but none worked as supposed.Therefore, I connected the Arduino's 5V to A0 to see if I would get 5V, no problem. But with the potentiometer it's inconsistent.
Do I really have to set A0 as input(I believe I dont) in order to "tell" Arduino to increase its impedance? Do I need to use any special potenciometer functions to read the values?(I believe I dont either)