Hi guys.I have a Sanguino Board.I wanted to connect a Potentiometer with the Sanguino board and read the values ( using analogRead() ), while changing its resistance.The following link tells how to connect an Arduino Board.
But I tried in the similar way in my Sanguino Board and only noticed that it took random values.So please help me out.Also tell the pins to which I need to connect the Potentiometer.
What size pot are you using? Resistance values above 10K may require longer measurement times and also produce larger errors.
The value shouldn't be random. If you turn the pot all the way CW and CCW do you
get a repeatable reading? Is the value random only while you are turning it?
Guys now its working.I initialized the analog pin as INPUT in the "setup()".So it acted as a digital pin.An analog pin should not be declared as INPUT or OUTPUT in the "setup()".I corrected that and now its working fine