Shop
OBEX
P1 Docs
P2 Docs
Learn
Events
Potentiometer controlling variable — Parallax Forums
toggle menu
Categories
Discussions
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Sign In
·
Register
×
Home
›
BASIC Stamp
Potentiometer controlling variable
Farraman
Posts:
5
2009-12-26 02:27
edited 2009-12-26 17:04
in
BASIC Stamp
I am wondering if there is a way to have a potentiometer control a single variable based on the position of the knob. I have a bs2 stamp and would like some help. Thanks.
Comments
Leon
Posts:
7,620
2009-12-26 13:01
edited 2009-12-26 13:01
There is a technique for reading the value of a resistance in an RC circuit connected to a pin. Alternatively, you could use an ADC.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
kf4ixm
Posts:
529
2009-12-26 13:22
edited 2009-12-26 13:22
Read the stampworks manual found here...
http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf
See page 40.
PJAllen
Banned
Posts:
5,065
2009-12-26 13:44
edited 2009-12-26 13:44
???
The "position of the knob" --
·
or the resistance there?
You can "read" the value of a pot using the
RCTIME
command.
·
(That's in PBASIC Help.)
Farraman
Posts:
5
2009-12-26 17:04
edited 2009-12-26 17:04
I got it guys, thanks. And sorry for not fully exploring other means first, I just didn't know where to start. I'm kinda new
Sign In
or
Register
to comment.
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf
See page 40.
The "position of the knob" --·or the resistance there?
You can "read" the value of a pot using the RCTIME command.· (That's in PBASIC Help.)