View Single Post
  #1   Spotlight this post!  
Unread 01-02-2003, 17:18
GrahamS314's Avatar
GrahamS314 GrahamS314 is offline
Registered User
FRC #0314 (Megatron Oracles)
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2002
Location: Flint, MI
Posts: 8
GrahamS314 is an unknown quantity at this point
Send a message via AIM to GrahamS314
Question Working with Potentiometers

Our team tried to test operating a van door motor using two pots -- one for feedback and one for control. Unfortunately, we couldn't get the motor to drive in the direction of decreasing the error. No one can figure out what's wrong. Here's the code:

if stack_pos - sw_stacker > 10 then pos_error
if abs(stack_pos - sw_stacker) < 10 then done_stack
neg_error:
error = (sw_stacker - stack_pos)
sw_stacker = 127 - (4 * error) / 10)
pos_error:
error = (stack_pos - sw_stacker)
sw_stacker = 127 + (4 * error) / 10)


Here are our pots:
PN 3825A-282-104A