
02-16-2016, 06:49 PM
|
|
Registered User
AKA: Jeremy Styma
 FRC #6077 (Wiking Kujon)
Team Role: Programmer
|
|
Join Date: Feb 2016
Rookie Year: 2016
Location: Posen, Michigan
Posts: 19
|
|
|
Re: Issues with LimitSwitch
Quote:
Originally Posted by rich2202
> while (counter.get() > 0)
You never initialize the counter. While that may be ok, I suggest doing that in RobotInit, just in case. At a minimum, I think you have to tell it which DIO channel to watch.
However, it doesn't really do anything in your code. It counts the number of presses, so it should always be >0 after the first press. You either want to see if it is pressed, or not. It doesn't do you much good to count the number of times it is pressed.
|
How would this be possible?
|