View Single Post
  #3   Spotlight this post!  
Unread 18-10-2009, 09:48
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
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