PDA

View Full Version : NEWBIE QUESTION: How to light LEDs based on FSX events?



Tom_G_2010
04-12-2011, 11:36 PM
I'm just starting to dip my toes in the waters of pit building. I have figured out some of the basic control input integration (switches and pots) using USB Encoders and FSUIPC4.

I'm working towards a generic GA pit for piston twin and single engine aircraft. I have put together an Audio Comm selector panel similar to the stock FSX Bendix King panel found in the 172 and several other FSX stock GA's. All switches are working correctly, but at this point do not have the LED's to indicate which switch is selected.

So my question is how do I get outputs from those and other indicators in FSX like Outer, Middle, and Inner marker, landing gear LEDS, etc. in order to drive /illuminate the LEDS I want to add to my panels?


Is there canned integration software and/or USB interface boards, etc. that I can use to start this phase of my pit build?

After I tackle that I'm off to figure out 7 segment LED displays, but thats a question for another post on another day... unless the software/hardware is the same.

THANKS!
Tom G.

AK Mongo
04-13-2011, 01:23 AM
Good question, Tom.

There are lots of answers, but I can tell you that I did mine using a phidgets led64 card and fs2phidgets interface software. fs2phidgets is freeware that provides a GUI for interfacing the physical led output in the led64 with fsuipc offsets.

I am using it currently to drive my leds for my GA warning panel, and OMI markers. It has a little learning curve, but I am happy to share my fs2p5 file with you so you can use it as a template for your build if you choose to go that route. I do not think it will do 7 segment displays, but I may be wrong.

There is one available for about 1/2 retail now on ebay:
http://cgi.ebay.com/Phidget-1030-PhidgetLED-64-Controls-up-64-LEDs-/330551251639?pt=BI_Robotics&hash=item4cf663d2b7#ht_543wt_932

This was a relatively simple project, compared to the other interface solutions I saw that require real programming, and not just fiddling around with the objects already available in fs2p5.

Clear as mud?

Reid

Tom_G_2010
04-13-2011, 07:04 AM
Reid,

Thanks for the info, and I may take you up on the fs2p5 offer. I need to figure out what's left, if anything, in the April SIM budget, but if I can swing it I'm going to pickup that Phidget 1030 to start experimenting. I had previously glossed over the offset portion of the FSUIPC4 documentation but not having an immediate need at the time I didn't go very far with it. More reading to do there...

Thanks!
Tom G.

Boeing 747 Flyer
04-13-2011, 11:07 AM
The Opencockpits Master Card/USB Outputs card should allow you to do all that.

These FSX "events" are acessed by SIOC through FSUIPC, in what is known as "FSUIPC Offsets".

So, an example (this is not how SIOC scripting is written; but more of a visual example to show you how it works):


IF OffsetX = P
THEN LEDZ = 1
ELSE (otherwise) LEDZ = 0

Note X = Anything (number)
Z = Anything (number)
P = Anything (Number)
1 = ON
0 = OFF

Regards,

Jack