View Single Post
  #7   Spotlight this post!  
Unread 18-03-2010, 11:22
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: LimitSwitches and Encoder Questions

Quote:
Originally Posted by dShad View Post
B)Encoder/Autonomous - I was also asked to try to make an autonomous program that goes forward for 4inches and kicks then goes forward 40inches and kick. For one is this possible? If so how would go about getting the encoder data and then setting it to run 4inches > kick > move 40 inches forward > kick > finish.
If you are using a relative encoder like the optical one from the KoP, and you are using autonomous independent:

- read and store the encoder count
- set motors to move forward at the desired speed
- poll the encoder count in a loop until it indicates a value that corresponds to a change of position of 4 inches
- kick the ball
- poll the encoder count in a loop until it indicates a value that corresponds to a change of position (from the original saved value) of 44 inches
- kick the ball
- stop the motors


~
Reply With Quote