View Single Post
  #5   Spotlight this post!  
Unread 08-03-2004, 09:25
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
Re: need some help with the OI, and wiring a display

Quote:
Originally Posted by pryoplasm
well, its not necessary, but something nice that i thought up for one of the drivers. in practice during the 6 weeks of hell (an affecionate name i assure you) she was able to listen to the compressor that creates a vacuum (which uses the helicopter theroy of engineering, where if you can't make it silent, then make it loud as hell) and was able to know whether or not the compressor was on or not.

in short, whenever the compressor is on, i want it to have a light or something go on at the drivers station.

thanks for listening
No problem, this should be pretty easy, I had a similar problem two years ago and came up with a easy answer.

Know those LEDs right on the OI? Those are controlled by two bytes, led_byte1 and led_byte2, that are broken up into their bits. I'm not sure off the top of my head what the bits are called, but look it up in ifi_aliases.h, I seem to remember it being fairly obvious what the variables were for.

Once you find those variables, drop something like this into the code that controls you compressor (I'm writing pseudo-code, don't copy and paste )...

Code:
 if compressor is on:
    led_1 = 1;
 else:
    led_1 = 0;
That way, when your compressor turns on (I'm assuming by the pressure switches), an LED on the OI comes on, when the compressor turns off, the LED turns off.

I'd write more, but I've got to run to my next class now, hopefully this is helpful, otherwise I'll check back this afternoon if you need more help .
__________________
AIM --> Woloi
Email --> ian@woloschin.com