View Single Post
  #4   Spotlight this post!  
Unread 10-02-2015, 11:13
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
Re: How to attach and code fsp 8268909?

It is hooked up to a PWM cable. You only need to wire the ground and signal (black and white, respectively) as the positive (red) wire has no use in a switch. Instead of plugging it into the PWM section of your RoboRIO, plug it into the section designated for digital inputs.

Programming side:

Code:
DigitalInput _switch1 = new DigitalInput(0);
if(_switch1.get) {
    System.out.println("Switch 1 is pressed!");
}
Reply With Quote