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
sebpil
Posts: 41
Hi
Have been using Mega 2560 aduinos for my full size flight simulator for years and things work very well.
I only use the arduino cards for LED's and 7 segment displays. However I would like to add push buttons to try how that works.
But I do not know how it works.
Have just build my hardware chronometer and would like to add the 7 push buttons I have to an arduino. But there are ony 34 digital pins.
Is it possible to connect a push button to analog pins?

It is very hard to find something about this issue and I have never done this. As I have seen all instructions are based on connecting to the digital pin socket only.
But when I look in Mobiflight I can choose input pin from 2-60 (at least, am not in front of the software right now). But how does that work?
Anyone having experience with this?

So far I have only been using Leo Bodnar BBI-32 cards for buttons and switches.
Would like to use the cards I already have right now if that would be possible but all my cards are very full right now, except the arduinos that only have been connected on the digital pins.

Hopefully someone know something and can point me in a direction of making my arduinos more useful than only for LEDs and 7 segmnet displays.

Have a great weekend!
2021-03-27 13:12
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

At first your numbers are wrong !

A Mega got 54 Digital Pins ( Not 34 as you said) .... Pin 0-53
A Mega got 16 Analog Pins .... Pin A0-A15
Mobiflight got internal 70 Pin Adresses Pin 0-69 Whatever only 68 are useable in case Pin Dig0 and Dig1 are INOP ( Serial interface from Mega internal)

In easy words.... Pin 0 and 1 are not to use.... Pin 2-53 represent the working DIG Pins on Mega... Pin 54-69 Represent the Analog Pins A0-A15
( In case of a Bug "maybe" Pin A15 is not working.... We observe this a.t.m. But Pins A0-A14 work ! )

********

About INPUTS:

A LeoBodnar BBI32 is technical a Joystick HID Controller.... So you send simply Joy Buttons into the System and use them e.g. in the Sim Itself on in FSUIPC.
Mobiflight is NOT a Joystick! It detect the Inputs internal in MF. ( A Mega can not be a Joystick in case it´s not a HID Device)

Means to build a Button you create it as device (simmular like you create a LED.... Just choose "button" for example.)
Then you build a Config.... This time in the INPUT Tab.
And there you can choose what this button should do.... E.g. Write a Offset, Send a Event ID, Controll in FS2020 a Simconnect Event....
OR
You can also Emulate Key Presses ( you can use in Sim or FSUIPC again to assign INput Actions like you currently do with Bodnars)

At Last: You could also emulate Joystick Buttons by using a Software called VJOY.
Here MF send Data to this Software, and Vjoy simmulate a Virtual Joystick. So the Simulator "think" there is a real Joystick and detect the Button Actions
BUT: This is a bypass.... If you need Joystick Inputs and you own a BBI32 then i would use it ! Make no sense to build a duifficult Bypass if you still can do it directly !

I hope all is clear..... If not, ask again !
Good Luck !
2021-03-27 14:38
Avatar
sebpil
Posts: 41
Wonderful, thank you!
Will try that. You are right all I was meaning is that the digital outputs are numbered 20-53 (and those are in total is 34 pins as I wrote), and the analog pins are A0-A15.
I did not sit in front of my simulator at the time writing as I wrote in the message.

But okay,
Will try it out, a bit "off grid" setup then when using the analog pins as they are number 54-69 in the list.
Would be better if the pins available in the list would be named A0...A15. Then it should be self explanatory, but maybe hard to do for you, I don't know.

As long as there is a possibility to use the A0-A15 I am happy.

Thank you very much for your reply have a great weekend!
2021-03-27 21:14
Avatar
sebpil
Posts: 41
Good day again.

Well I have now tried to use a push button at A0.
Then I go to Configuration wizard and I do not have any input tab here, I only have FSUIPC, Compare, Display and Condition.

It is not possible to use the display tab even after I added the push button and uploaded to the arduino. It is simply not there.
If I go to Dsiplay tab choose the correct arduino and Use type of set to Pin

The new button is simply not there.

Guess it is not possible to use the mobiflight I have to add buttons. My firmware is 1.9.5

Is there a solution for this?
2021-03-28 18:12
Avatar
sebpil
Posts: 41
My fault sorry. Just updated the drivers everything works.
Have a great day.
2021-03-28 18:43
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

That was no "Driver" Problem !

You simply use the wrong Tab in Mobiflight !

iconsebpil:


Well I have now tried to use a push button at A0.
Then I go to Configuration wizard and I do not have any input tab here, I only have FSUIPC, Compare, Display and Condition.



A Push Button is a INPUT..... If your Config include a "Compare" and a "Display" Tab then it was a OUTPUT Config 100% ..... Inputs not have these Tabs !

And sure.... A Button is not in the Dropdown Lists for Output Configs..... Only LED, Displays and Motors.
Otherwise in Input Configs you see in dropdown only Buttons and Encoders.... Here the Outputs are missing !


In case you still work with it you find out..... In MF Connector main Window you got 2 Tabs.... One for Input and next one for Output Configs !
Good Luck !
2021-03-29 09:16
icon