0

Potentiometer problem.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Potentiometer problem.

by ArdCase. on Sat Nov 27, 2010 6:17 pm

I have set up my potentiometer via tutorials. The problem I am having at the moment is that it only reads on and off i.e. 1 and 0 in the serial output. It reads a 1 when initialised then it reads a 0 when it is turned approx halfway on on my arduiono board.

So in some respect it is working in a ltd way. What I need though is to have it reading the 0-1023 numbers dynamically to control animations. Is this potentially a problem with the board or am I doing something wrong?

Any help on this appreciated.
ArdCase.
 

Re: Potentiometer problem.

by ImaginaryAxis on Sat Nov 27, 2010 6:52 pm

Maybe those who have used Arduino more will be able to help quickly, but do you have a schematic or something I can look at to see how it is hooked up?

ImaginaryAxis
 
Posts: 267
Joined: Sat Nov 13, 2010 3:16 pm
Location: Phoenix, AZ

Re: Potentiometer problem.

by stinkbutt on Sat Nov 27, 2010 6:59 pm

It smells like you're using a digital pin attempting to read an analog signal, so it's calling everything over, say 0.5V as 1V and everything below as 0. Or whatever Vcc is...

What pin are you reading? More specifically, which arduino are you using and what pin on it?
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: Potentiometer problem.

by adafruit_support_bill on Sat Nov 27, 2010 7:09 pm

Post your code. A circuit diagram would be helpful too.

adafruit_support_bill
 
Posts: 76240
Joined: Sat Feb 07, 2009 10:11 am

Re: Potentiometer problem.

by cashman04 on Sun Nov 28, 2010 8:14 pm

In the tutorial you have to use analog pin 0, not digital pin 0. I made that mistake too when I first did that one the other day.
cashman04
 
Posts: 25
Joined: Fri Nov 19, 2010 7:04 pm

Re: Potentiometer problem.

by stinkbutt on Sun Nov 28, 2010 8:19 pm

arduwino wrote:Post your code. A circuit diagram would be helpful too.


What he said
Red M&M, Blue M&M: They all wind up the same color

stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: Potentiometer problem.

by ArdCase on Sat Dec 04, 2010 5:47 pm

stinkbutt wrote:It smells like you're using a digital pin attempting to read an analog signal, so it's calling everything over, say 0.5V as 1V and everything below as 0. Or whatever Vcc is...

What pin are you reading? More specifically, which arduino are you using and what pin on it?

Hi apologies for delay in getting back, I coudn't log in for awhile but admin fixed it. Anyways thanks for the great and fast replies. It turns out that I was doing what 'stinkbutt' said above :oops:

I have everything working so far with multiple sensors controlling animations in Flash. Thanks again for input, I'm looking forward to working with the forum expertise:).
ArdCase
 
Posts: 1
Joined: Sat Dec 04, 2010 5:42 pm

Please be positive and constructive with your questions and comments.