View Single Post
  #1   Spotlight this post!  
Unread 31-01-2011, 14:59
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Photoswitches flashes true but then stays false

Ok, so we were testing out the photoswitches.
The wiring is this:
Brown the positive
Blue to negative
Both on the power distributor with a 20 amp circut breaker
White to port 1 in the digital I/O of the digital sidecar
Basically what happens is that we hit enable, the value flashes true (we have the value printed to the DriverStationLCD) and then stays false.
Here is my code so far
Code:
DigitalInput tracker = new DigitalInput(1);
teleopPeriodic(){
DriverStationLCD.getInstance().println(Main6, 1, ""+tracker.get());
DriverStationLCD.getInstance().updateLCD();
}
__________________
Reply With Quote