Log in

View Full Version : Feed back LEDS on OI


bstempi
23-02-2004, 16:25
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?
:ahh:

Phil_Lutz
23-02-2004, 16:32
Should read

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

bstempi
23-02-2004, 17:08
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.