Go to Post Read the manual! - Trent B [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 23-02-2004, 16:25
bstempi bstempi is offline
Captain
#0708 (Hardwired Hatters)
Team Role: Student
 
Join Date: Feb 2004
Location: Horsham, Pa
Posts: 23
bstempi is an unknown quantity at this point
Send a message via AIM to bstempi
Feed back LEDS on OI

Hey everybody.

I have 3 banner sensors on the front of my bot. They are hooked up to digital inputs 1, 3, and 5. I wanted to get some feed back from them without using dashboard and having to carry around a laptop. So, I decided that I wasnted to use the feedback LEDS on the OI. In the bottom of user_routines.c, i added a few lines like this:

SWITCH_1 = !(int)rc_digital_in01;

and modified it for each LED. I know i have the switch one variable wrong because i'm not looking at the code right now. Can anybody tell me what i'm doing wrong?
  #2   Spotlight this post!  
Unread 23-02-2004, 16:32
Phil_Lutz's Avatar
Phil_Lutz Phil_Lutz is offline
Phil Lutz
#0851 (Froggers)
Team Role: Mentor
 
Join Date: Jan 2004
Location: El Segundo, CA
Posts: 67
Phil_Lutz is on a distinguished road
Send a message via Yahoo to Phil_Lutz
Re: Feed back LEDS on OI

Should read
Code:
    Switch1_LED = !(int)rc_dig_in01;
    Switch2_LED = !(int)rc_dig_in03;
    Switch3_LED = !(int)rc_dig_in05;
Remember you can always go back and look at the default code...

Hope this helps,

Phil
  #3   Spotlight this post!  
Unread 23-02-2004, 17:08
bstempi bstempi is offline
Captain
#0708 (Hardwired Hatters)
Team Role: Student
 
Join Date: Feb 2004
Location: Horsham, Pa
Posts: 23
bstempi is an unknown quantity at this point
Send a message via AIM to bstempi
Re: Feed back LEDS on OI

Ok, I figured out my problem. My banner sensors were returning a low of 7 volts, and a high of 12 volts to the controller, indicating that it was always 1. Thanks for your help.
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
What if FIRST changed back to 2 coaches? D.J. Fluck General Forum 45 08-01-2007 18:25
Methods of Mounting LEDs Matthew_H Electrical 9 21-03-2004 23:15
LED's, resistors, computers... ohm my! DanL Electrical 3 01-07-2003 09:37
Good or bad: back wheels coming off the ground Gui Cavalcanti Technical Discussion 2 17-03-2002 22:09
Taking the kits from Manchester on planes back to home base Ken Leung General Forum 4 24-09-2001 22:47


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

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