Shop OBEX P1 Docs P2 Docs Learn Events
5K POT reading? — Parallax Forums

5K POT reading?

bennettdanbennettdan Posts: 614
edited 2006-07-31 12:09 in BASIC Stamp
Hello,
···· I have a 5k pot that I am reading with the RCTIME comand and the values for full clockwise are 185 and full counter clockwise are 114. The problem is when I use the WAM text to scale and offset the numbers to make a servo follow the pot the program says the number I am using to scale it with is larger than 16 bits. How can I make the code work with a 5k pot?

I am using·a .1uf cap to·with the 5k to read it with RCTIME

What I want to do is position a Servo with a 5K pot instead of a 10K like in the WAM text. It should be simple but I am drawing a blank.



Post Edited (bennettdan) : 7/31/2006 1:16:02 AM GMT

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-07-31 01:55
    I don't have the WAM-text, but it is still an RC circuit.· You want to preserve the same R-C relationship, so if RC is originally 10K * C and you·reduce R by 1/2 then the C should be 2 times the original (text's) C.· So, whatever it is, put the same value in parallel with it.

    ( RC = 10K * C, therefore RC = 5K * 2C )
  • bennettdanbennettdan Posts: 614
    edited 2006-07-31 12:09
    Thanks PJ
    I will try it tonight and see what I get I was thinking the same but was putting it in series..
Sign In or Register to comment.