View Single Post
  #1   Spotlight this post!  
Unread 05-10-2010, 22:46
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Several questions (language comparison)

Quote:
Originally Posted by Ether View Post
Why did you need an ISR to handle this? Was 20ms not fast enough?
Our kicker rotated and launched outward when the kick button was pressed. The rotations were at an extremely high speed. To prevent the kicker from coming out at an unpredictable and generally unfavorable angle, we used the sensor as an interrupt to make sure the kicker could come out at a predictable angle. As the speed of the rotator increased, the range of angles for a good kick decreased, so the room for error in the timing of the code wouldn't allow for timing of the kick to occur in the main loop. The interrupt checks a flag for whether to kick, and also will delay the kick as needed to compensate for the speed of the kicker (without the extra timing code, the kicker only works around 75% power)
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"