MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
PilotOlivier
From: France
Posts: 9
Hello everyone

I'm working on using a momentary switch with Arduino to control my home cockpit running Xplane12.

When I turn the switch up, the command "KA350/cmd/pSubpanel/busSenseDec" is called.
When I set the switch to the down position, the "KA350/cmd/pSubpanel/busSenseInc" command is called.

These commands work very well with the switch on my HOTAS Warthog.

I'm trying to program Mobiflight without success.

Can anyone help me?
2024-03-09 17:34
Avatar
XPRoberto
From: Hungary
Posts: 65
Hi,

1st check this basic tutorial, if you haven't done yet.
https://www.mobiflight.com/en/tutorials/switch-parking-brake.html

Wire the switch as follows:
middle GND + 1 input for up + 1 input for down
Connect the 2 inputs to the Arduino. (note the PIN numbers)

MF module menu
add the 2 inputs connected to the PINs

MF config - input tab:
input_up -
on the dialog choose xplane action, then tick the lower checkbox (Show code, or something similar)
then in the list choose command instead of dataref
then copy below this: KA350/cmd/pSubpanel/busSenseDec

Similarly the down event.
----------------------------------------------------------------
Do you know that you can simplify: if($=1,0,1) ?
Use simply: 1-$ :)
2024-03-11 13:59
Avatar
PilotOlivier
From: France
Posts: 9
iconXPRoberto:

Hi,

1st check this basic tutorial, if you haven't done yet.
https://www.mobiflight.com/en/tutorials/switch-parking-brake.html

Wire the switch as follows:
middle GND + 1 input for up + 1 input for down
Connect the 2 inputs to the Arduino. (note the PIN numbers)

MF module menu
add the 2 inputs connected to the PINs

MF config - input tab:
input_up -
on the dialog choose xplane action, then tick the lower checkbox (Show code, or something similar)
then in the list choose command instead of dataref
then copy below this: KA350/cmd/pSubpanel/busSenseDec

Similarly the down event.



Hi XPROberto

Thank you for your answer. I know that you wrote... it is working very well for the normal switch.

Sorry if my question was not clear but I would like to do the same but with a switch which has momentary position.
2024-03-11 21:07
Avatar
XPRoberto
From: Hungary
Posts: 65
iconPilotOlivier:


Hi XPROberto

Thank you for your answer. I know that you wrote... it is working very well for the normal switch.

Sorry if my question was not clear but I would like to do the same but with a switch which has momentary position.


Hi,
Well. I think it is working like that for a momentary switch.
You push up then the command (KA350/cmd/pSubpanel/busSenseDec) executed once.
----------------------------------------------------------------
Do you know that you can simplify: if($=1,0,1) ?
Use simply: 1-$ :)
2024-03-11 22:05
Avatar
Allenwood
Posts: 13
Local exterminator services offer comprehensive pest control solutions tailored to the specific needs of residential and commercial properties within the community. With a focus on efficiency and effectiveness, these services employ skilled technicians who are well-versed in the Best pest control techniques and use environmentally friendly products whenever possible. Whether dealing with common household pests like ants, cockroaches, and rodents, or tackling more specialized infestations, such as termites or bed bugs, local exterminators employ a combination of inspection, treatment, and prevention methods to ensure the complete eradication of pests while minimizing risks to human health and the environment. Additionally, these services often provide ongoing maintenance plans to help prevent future infestations and ensure long-term pest-free living or working environments for their clients.

2024-04-15 09:41
icon