Go to Post Besides, you know hard it is to solder with gloves on? - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-10-2009, 03:41
955Tyler's Avatar
955Tyler 955Tyler is offline
Registered User
FRC #0955 (RaiderBot)
Team Role: Programmer
 
Join Date: Mar 2007
Rookie Year: 2006
Location: Corvallis,OR
Posts: 3
955Tyler is an unknown quantity at this point
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!
  #2   Spotlight this post!  
Unread 18-10-2009, 09:47
Ted Weisse's Avatar
Ted Weisse Ted Weisse is offline
Registered User
AKA: xMentor/Inspector/Referee
no team
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Green Bay, WI
Posts: 106
Ted Weisse is a glorious beacon of lightTed Weisse is a glorious beacon of lightTed Weisse is a glorious beacon of lightTed Weisse is a glorious beacon of lightTed Weisse is a glorious beacon of light
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
__________________
If I am not for myself, who will be for me?
If I am not for others, what am I?
And if not now, when?

-Rabbi Hillel
Jewish scholar & theologian (30 BC - 9 AD)
  #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
  #4   Spotlight this post!  
Unread 18-10-2009, 14:16
dtengineering's Avatar
dtengineering dtengineering is offline
Teaching Teachers to Teach Tech
AKA: Jason Brett
no team (British Columbia FRC teams)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Vancouver, BC
Posts: 1,833
dtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond repute
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
  #5   Spotlight this post!  
Unread 18-10-2009, 17:30
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
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.
__________________
-
An ounce of perception is worth a pound of obscure.
  #6   Spotlight this post!  
Unread 18-10-2009, 23:44
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
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.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Digital Inputs Driver Station dboisvert C/C++ 2 25-02-2009 20:09
Digital Inputs? Straberrie Programming 4 15-02-2009 01:47
Digital Inputs + Auton? Straberrie Programming 13 13-02-2009 11:28
Digital Inputs KRibordy C/C++ 5 25-01-2009 00:35
Analog vs Digital inputs? f22flyboy Programming 8 08-11-2002 22:18


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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