Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Digital inputs on old FRC (http://www.chiefdelphi.com/forums/showthread.php?t=78685)

955Tyler 18-10-2009 03:41

Digital inputs on old FRC
 
Hey all,

My team is constructing an off season robot that is using one of our old control systems. I have everything programmed and working except i'm having troubles with the digital inputs. I need to read pressure sensors, and i cant get the digital inputs to change via the pressure switch or any manual switch. I'm printing the digital input and it is stuck at 1. Is it 1 by default? any suggestions for testing? or am i missing something completely? its been a awhile since i have done anything with the old FRC so maybe i have just forgot something.

Thanks everyone!

Ted Weisse 18-10-2009 09:47

Re: Digital inputs on old FRC
 
Here is a link to the doc at IFI:

http://www.ifirobotics.com/docs/anal...al--i-o-rc.pdf

State of the input is based on which one you are looking at...

Hope this helps...

Ted

RyanCahoon 18-10-2009 09:48

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

dtengineering 18-10-2009 14:16

Re: Digital inputs on old FRC
 
It is possible that your code is correct, but the pressure switch is not working properly... not likely, perhaps... but possible.

Have you tried checking the pressure switch with an ohmmeter to see if the contacts are closing and opening?

Alternatively, have you tried hooking up a switch (or just using jumpers) on the i/o pin to see if your code can read a "known good" switch?

You probably have, but just thought I'd add a "check the hardware" comment in amongst all the helpful software advice.

Jason

Chris Hibner 18-10-2009 17:30

Re: Digital inputs on old FRC
 
If you are sure that the switch is working (by using a multimeter) and you are sure your code is correct (by using the default code or code tested by another team), then you should check for metal chips in/around/under the input pins. I've seen metal chips create a short that causes all pins to pull high or low, which makes the input "stuck" either on or off.

Al Skierkiewicz 18-10-2009 23:44

Re: Digital inputs on old FRC
 
Tyler,
To be sure, you are using a pressure switch and not a pressure transducer? Both were provided as KOP supplies in some of the past years. The transducer is an analog device, while the pressure switch is a just that and is connected to a digital input. Using a PWM cable, you cut off the connector at one end, pulled back the 5 volt wire and insulated it, then attached the signal and the ground wire of the PWM cable to the switch.


All times are GMT -5. The time now is 01:12.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi