View Single Post
  #12   Spotlight this post!  
Unread 18-04-2006, 08:54
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Re: How to end an auto mode after gyro gets out of deadband

Quote:
Originally Posted by Travis Covington
Once we get hit and the gyro senses rotation, we want the robot to just stop.
Let's say that you have a good initial value for your neutral point, and that you can handle the case where each sample bounces around that point a bit ie. you have a stable value for zero rotation. You don't necessarily want to stop for a minor disturbance, such as small irregularities in the carpet, so pick a +/- threshold away from you neutral point, and some time threshold of persistence - (9 passes ~1/4sec?) If you exceed those two thresholds, together, then set a latch variable that stomps on the chassis pwms and sets them to 127.
Then you can turn the two threshold "knobs" to get the behavior you are looking for.

Eric
__________________

Don't PANIC!
S. P. A. M.