View Single Post
  #2   Spotlight this post!  
Unread 30-01-2013, 12:24
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is online now
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,722
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: LimitSwitch as Command Button

Quote:
Originally Posted by Joe Ross View Post
That is designed for a driver station digital i/o, not on the robot. To do it on the robot, it would not be hard to create a class to extend Button that reads from a digital i/o on the robot. Alternately, you could create an InternalButton object and periodically call the setPressed method with the state of the limit switch.
My only worry is getting multiple triggers with one press from noise on the channel. We're trying to implement a frisbee counter that count frisbees coming in and leaving the robot. We tried using the Counter class, but we kept getting random increases in the count from the limit switches. I'm assuming there was noise as the switch was pressed which made it think that there were multiple presses.
Reply With Quote