As Tony said, part of your problem is trying to run before walking.
If you are willing to learn how to harness Air Manager, you’ll have to learn a bit of Lua programming first. The video I suggested is a good start.
You produced some code:
Code: Select all
if Electrical_bus_main_amps[2] <24 then
Hw_set_led(led_alt, 1)
Else
Hw_set_led(led_alt, 0)
End
That is not likely to work, simply because in almost every programming language, keywords are case sensitive.
In Lua, Else is different from else and End is different from end . The former is invalid while the other is correct. A hint: in the Code editor, keywords are always in color, so if a keyword is black that means it is not recognized (typo error or undefined)
Maybe we should start from here? And second, Tony’s video tutorial are a great help.
Then progress to your problem at hand, which is having the lights react to the amps value.
Once again, what is the airplane you want this light for, as I gather you were using MSFS?
Could you simply copy/paste the whole code of the instrument here (and use the </> button to format it)?
We could see what is the problem exactly.