View Single Post
  #4   Spotlight this post!  
Unread 08-03-2003, 01:36
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
Success . . . Sort of

We have now gotten readouts from the first sensor using Gyro power, but the second input reads a constant 1. We tried changing the variable to another digital input, but to no avail. Help!!! Also, our counts using the first input to determine position are very inaccurate. They are:
if sw_stacker >= 136 then stack_up
if sw_stacker <= 122 then stack_down
stack_up:
stack_pos = stack_pos + A_out
arm_out = sw_stacker
goto done_stack
stack_down:
stack_pos = stack_pos - A_out
arm_out = sw_stacker
done_stack:

in the above, sw_stacker is a pot on the OI control system, stack_pos is a counter for postion (=0 at the beginning of the loop), A_out is the first input from the encoder (0 or 1), and arm_out is the variable sent to the van door motor running our stacker.