View Single Post
  #2   Spotlight this post!  
Unread 03-02-2009, 21:44
Mike Mahar Mike Mahar is offline
Registered User
FRC #0138
 
Join Date: Jan 2007
Location: Amherst, NH
Posts: 64
Mike Mahar will become famous soon enough
Re: Trouble Reading Drivers Station Digital Inputs

Quote:
Originally Posted by Maxpower57 View Post
we had this problem too. the problem is that the driverStation reads the switch as a 1 if the signal has a + voltage and a 0 otherwise. which sounds nice except if it is disconnected, it bounces back and forth between 1 and 0 (blame cosmic rays)

the fix is (sort of) easy, though a little unprofessional
attach a ground wire with a 150ohm-ish resistor(thats what we used) to the signal pin, and have the switch connect the positive pin as normal
this wil cause the voltage to always be negative if the switch is disconnected, and when it is connected, mostly positive

you might want to play around with the resistor ohms to get a good mix


hope that helped
Alas, this is not the problem. I'm getting the variable results when the signal is tied to +5. Not just when the switch is open. Tying the signal to +5 should always be a 1. I understand the use of a pull-up/pull_down resister and we will use one when we wire up or control panel. Hard wiring the signal to +5 is what we are doing now, however and we're still getting the problem.
Reply With Quote