View Single Post
  #6   Spotlight this post!  
Unread 16-02-2016, 23:32
Mr V's Avatar
Mr V Mr V is offline
FIRST Senior Mentor Washington
FRC #5588 (Reign)
Team Role: Coach
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Maple Valley Wa
Posts: 994
Mr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond repute
Re: PWM Cable Voltage

The voltage potential you see on each wire depends on what port of the RoboRio you connect it to.

If you want to use a PWM cable to monitor a limit switch you'll want to plug it into a DIO port. Plugged into a DIO port the red wire is 5v the black wire is ground, while the white wire is your signal wire.

You'll want to connect the white wire and black wire to your switch that is activated when pressed. Then in code you want to configure the pin as an input and look for the voltage on the signal wire to go low. There is an internal pull-up resistor so it will show voltage when not connected to ground.
__________________
All statements made on Chief Delphi by me are my own opinions and are not official FIRST rulings or opinions and should not be construed as such.




https://www.facebook.com/pages/Team-...77508782410839