View Single Post
  #5   Spotlight this post!  
Unread 05-02-2008, 23:33
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,753
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Holding Down Buttons on the Remote

i think the point is that the command or subroutine that is executed by pushing a button isn't of the form "while the button is being pressed". Instead, you could have something that says "when the button is pressed, turn left 5 degrees" - naturally, holding down the button will result in this sequence getting called many times. Of a similar nature, you could have a command that says "drive forward 1 foot" - again, if the button is held down, you would execute this command multiple times.

Keep in mind, though - holding down buttons can be bad for you, your teammates, and your opponents. The IR boards are fairly sensitive, and by holding down a button you could flood the other teams out of being able to communicate with their robot. Similarly, if they push a button while you're holding yours, it could interrupt your signal. For the sake of everyone, it's much better to break your commands into discrete time chunks and avoid holding buttons.