|
Re: Digital inputs on old FRC
The default code contains an example of how to control a compressor on relay8 using the pressure switch on dig_in18, so take a look at that first for an example on reading digital inputs.
--Make sure you have digital_io_18 set to input
--Try a different input, in case the one you're using is broken
--The inputs have pull-ups enabled, so they're naturally high by default. The pressure switch should be connected so that it is pulling the input low, i.e. the switch is connected between the signal line and ground.
--Ryan
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
|