Go to Post In fact, our robot YOLOs so hard it does drive-bys on the refs. - TrevorKN [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 13-02-2008, 15:05
Boydean's Avatar
Boydean Boydean is offline
The Blue Alliance
no team
Team Role: Alumni
 
Join Date: Apr 2007
Rookie Year: 2003
Location: SC
Posts: 319
Boydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant future
Send a message via AIM to Boydean
Limit Switch Problem

Just to make note I don't really know if this goes in the Electrical or Programming...so move it please if its in the wrong one.

Ok, right now I'm having some problems to get the limit switch to work. We have it in "digital_io_18". the code is a simple.

Code:
if(digital_io_18 == 1)
{
 printf("Switch = %d",digital_io_18);
}
digital_io_19 = INPUT;

The problem is that its not changing states, but the controller LED "RC Hardware" is turning yellow(aka +5V output low) when its pressed

PS we have the switch on "normally closed"

PSS we are using kevin's 3.0 code
__________________
  #2   Spotlight this post!  
Unread 13-02-2008, 15:13
jln646v jln646v is offline
Registered User
AKA: Vincent Juliano
FRC #0514 (RPM)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Miller Place
Posts: 4
jln646v is an unknown quantity at this point
Send a message via AIM to jln646v
Re: Limit Switch Problem

Why are you using digital_oi_18? Why dont you just use rc_dig_in18? I am not sure if this is the same thing but it might be your problem.

if (rc_dig_in18==1)
{
printf("");
}

Also, when you say your rc hardware light is yellow, your not shorting out the digital input are you? Make sure you are connecting the ground and signal pins, not the ground and +5.
  #3   Spotlight this post!  
Unread 13-02-2008, 15:25
Boydean's Avatar
Boydean Boydean is offline
The Blue Alliance
no team
Team Role: Alumni
 
Join Date: Apr 2007
Rookie Year: 2003
Location: SC
Posts: 319
Boydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant future
Send a message via AIM to Boydean
Re: Limit Switch Problem

Danke, that did it. We did in fact have the +5v plugged into it. That was a bad thing.
__________________
  #4   Spotlight this post!  
Unread 13-02-2008, 16:32
ay2b's Avatar
ay2b ay2b is offline
Registered User
AKA: Andy
FRC #2928
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 1994
Location: Seattle, WA
Posts: 211
ay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant future
Re: Limit Switch Problem

Quote:
Originally Posted by jln646v View Post
Why are you using digital_oi_18? Why dont you just use rc_dig_in18? I am not sure if this is the same thing but it might be your problem.
All the digital pins are INPUT/OUTPUT pins. digital_io_18 is used to set whether the pin is used for input or for output. If it is used for input, then rc_dig_in18 is used to read the value.
__________________

2011 - SD Quarterfinalists (980), LA Quarterfinalists (980)
2010 - LA (2404) Finalists (980), AZ Motorola Quality (980)
2009 - LA Semifinalists (980); Las Vegas Quarterfinalists (980); SD (2404); IRI #1 Seed, Finalist (980)
2008 - SD Quarterfinalists (980), LA Champions (980), LA Rookie Inspiration Award (2404); CalGames Finalists
2007 - So.Cal Finalists (980), SD Quarterfinalists (980); CalGames Finalists
2006 - So.Cal Regional Champion (4), Toronto Judge's Award Day 1 (4)
2005 - SVR Champions, Delphi "Driving Tomorrow's Technology" (980); AZ Xerox Creativity (980); So.Cal Finalists, RadioShack Innovation in Control (980); Championship Archimedes Division Semifinalists; IRI Finalists (980)
2004 - So.Cal Regional Champions, Leadership in Controls (980); AZ GM Industrial Design (980); Championship Galileo Division #2 Seed; IRI Champions
2003 - PNW Semi-finalists (488)
2002 - PNW Finalists (488)
2000 - X-bot / 488 - Mentor / Founder
1994 - Sunny Delight - Driver - champion
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
Using a limit switch to limit motion ManicMechanic Programming 16 20-12-2007 00:54
Using a limit switch thunderbolt Programming 1 02-04-2007 19:36
limit switch wedellm Electrical 4 16-02-2007 13:01
Limit switch in easy c? chadbarbe Programming 6 02-02-2006 09:51


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

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