Potentiometers that come with the arduino starter kit

For makers who have purchased an Adafruit Starter Pack, get help with the tutorials here!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
suicas
 
Posts: 2
Joined: Fri Aug 01, 2008 9:15 am

Potentiometers that come with the arduino starter kit

Post by suicas »

I've gone through the 5 lessons (and great they were too!), and a bunch of the examples at arduino.cc .

One thing I can't seem to get working is the potentiometers supplied with the arduino starter kit (the ones marked R103).

I connected one outer pin of the pot to ground, the other outer pin to 5V, and the middle pin to pin 2 on the arduino.

I've set it as an input pin, used the code from arduino.cc, and used analogRead and Serial.println to print the value of pin 2.

No matter how I rotate the potentiometer, I get a reading of around 300. If I unplug the potentiometer, I still get the same reading.

Any idea what I'm doing wrong? I've tryed both pots, and several different input pins, but with no luck!

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

use a multimeter to verify the voltages to make sure you have hooked it up properly
then it wil be clear if its the arduino code or the pot
http://www.ladyada.net/learn/multimeter/

suicas
 
Posts: 2
Joined: Fri Aug 01, 2008 9:15 am

Post by suicas »

Aha! After some investigation it turns out I was using digital pin 2 instead of analog pin 2 on the board.

I hadn't looked at the analog pins up until now, I'd just assumed each pin had a unique number!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Starter Pack”