LED Output: APU Master & Start demo

One of the first things I tested is the digital output. I put together two 2-LED switch modules to show the status of the APU Master and APU Start buttons. And it was easier that I thought! Digital output with SimVim and Arduino is very straight forward. Using the configurator, you just select the parameter, pick whether it is a single LED or a display type of output and then assign it to a pin on the Arduino board.

Here’s my custom.cfg datarefs for the APU Master SW Fault/ON lights, and APU Start ON/AVAIL LEDs:

[DATAREF]
TYPE=FLOAT
OBJECT=Aircraft.Cockpit.Overhead.APU_MasterFault.Power
DATAREF=a320/apu/master_fail
DATAREF_TYPE=INT
MULTIPLIER=1
CONDITION=>
CONDITION_VALUE=0
CONDITION_RESULT=1

[DATAREF]
TYPE=FLOAT
OBJECT=Aircraft.Cockpit.Overhead.APU_MasterFault.Power
DATAREF=a320/apu/master_fail
DATAREF_TYPE=INT
MULTIPLIER=1
CONDITION=<
CONDITION_VALUE=1
CONDITION_RESULT=0

[DATAREF]
TYPE=FLOAT
OBJECT=Aircraft.Cockpit.Overhead.APU_MasterOn.Power
DATAREF=a320/apu/master_on
DATAREF_TYPE=INT
MULTIPLIER=1
CONDITION=>
CONDITION_VALUE=0
CONDITION_RESULT=1

[DATAREF]
TYPE=FLOAT
OBJECT=Aircraft.Cockpit.Overhead.APU_MasterOn.Power
DATAREF=a320/apu/master_on
DATAREF_TYPE=INT
MULTIPLIER=1
CONDITION=<
CONDITION_VALUE=1
CONDITION_RESULT=0

[DATAREF]
TYPE=FLOAT
OBJECT=Aircraft.Cockpit.Overhead.APU_StartAvail.Power
DATAREF=a320/apu/start_avail
DATAREF_TYPE=INT
MULTIPLIER=1
CONDITION=>
CONDITION_VALUE=0
CONDITION_RESULT=1

[DATAREF]
TYPE=FLOAT
OBJECT=Aircraft.Cockpit.Overhead.APU_StartAvail.Power
DATAREF=a320/apu/start_avail
DATAREF_TYPE=INT
MULTIPLIER=1
CONDITION=<
CONDITION_VALUE=1
CONDITION_RESULT=0

[DATAREF]
TYPE=FLOAT
OBJECT=Aircraft.Cockpit.Overhead.APU_StartOn.Power
DATAREF=a320/apu/start_on
DATAREF_TYPE=INT
MULTIPLIER=1
CONDITION=>
CONDITION_VALUE=0
CONDITION_RESULT=1

[DATAREF]
TYPE=FLOAT
OBJECT=Aircraft.Cockpit.Overhead.APU_StartOn.Power
DATAREF=a320/apu/start_on
DATAREF_TYPE=INT
MULTIPLIER=1
CONDITION=<
CONDITION_VALUE=1
CONDITION_RESULT=0

That’s a lot of code for just two switches with two LEDs each! And I agree. The reason is a funny one: you need to use two [DATAREF] blocks for each light, one to turn the light on, the other one to turn it off. Not sure why that is because it worked just fine with a single block with the older version of FFA320Connector. Ah well…

The data.cfg file is a lot shorter though:

L42 APU_Off_Bus
L43 APU_Gen_On
L44 APU_Fault
L45 APU_Running

As you can see, the LEDs are connected to pins 42 to 45 on the Arduino board. What might not be apparent is which parameters do what.

The thing is, at the moment the SimVim parameter list does not cover all the possible A320-specific actions so you need to take what’s available and make it work through linking those parameters with your own custom datarefs using the Conversion Tool.

In the case of the APU LEDs, here’s how I linked those together:

L42 APU_Off_Bus → a320/apu/start_on
L43 APU_Gen_On → a320/apu/master_on
L44 APU_Fault → a320/apu/master_fail
L45 APU_Running → a320/apu/start_avail

I know, it doesn’t make much sense in some cases but as I explained earlier, you just have to work with what you have.

And here’s a short video showing it works. First, I flick the ANN LT toggle switch to TEST position to turn on all four LEDs. After the test, I click the two buttons and the corresponding LEDs light up. There’s a wee waiting in that video when the APU is actually starting up, make sure to stick around for a few extra seconds so you see how the APU Start ON LED turns off and the AVAIL LED comes to live (the green LED is somewhat dimmer compared to the blue LEDs, I might use a lower value resistor at some point).

Until next time!