Hi All,
Still a work in progress but everything works so far. I am using Prepar3d V4.1 (which does not support the IDENT function) and Prosim737. I am thinking about implementing IDENT with FSUIPC through a Leo Bodnar interface.
I have hooked up an Arduino Uno with a 4-channel relay board (I first tried with a PI3 but no joy) using this code:
function new_ident()
relay_1 =hw_output_add("ARDUINO_UNO_A_D9",false)
end
function release()
relay_1 =hw_output_add("ARDUINO_UNO_A_D9",true)
end
switch_15 = button_add("clear.png","sel_btn.png",22,260,45,32,new_ident, release)
This works fine. The relay closes when the IDENT button is pressed and opens when it is released. I tried to do it using the hw_output_set command but I could not get it to work. Is the above code an adequate way of doing this? I plan to use this solution for other functions.
Thank you,
Pierre
First intrument (Collins RTU) and a question
Re: First intrument (Collins RTU) and a question
Hi,
Try to make sure to only call hw_output_add only once at the start of your script.
Then call hw_output_set when you want to change the output based on flight sim data (or something else).
Hope this makes sense. Let me know if this helps,
Corjan
Try to make sure to only call hw_output_add only once at the start of your script.
Then call hw_output_set when you want to change the output based on flight sim data (or something else).
Code: Select all
my_output = hw_output_add("ARDUINO_UNO_A_D9", false)
function new_ident()
hw_output_set(my_output ,false)
end
function release()
hw_output_set(my_output ,true)
end
switch_15 = button_add("clear.png","sel_btn.png",22,260,45,32,new_ident, release)
Hope this makes sense. Let me know if this helps,
Corjan
Re: First intrument (Collins RTU) and a question
That worked fined. Thank you. I am now working on eliminating the relay board by having the Air Manager Arduino talking to a MobiFlight Arduino that will send FSUIPC offsets to Prepar3d.