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
mobiflight@jeepin95.com
Posts: 2
I am new to Mobiflight but have tried building my own custom panel. I am currently using a new Mega2560 Pro Mini but also tried this on an official Arduino Mega 2560 with the same results. I have 2x8 digit Max7219 displays, 4 encoders with buttons, then 5 additional buttons with LED rings. I've wired up all but the last 2 buttons but have been noticing this issue where the LEDs will get out of sync with the the desktop software. I have 1 LED button set to toggle HDG hold and the LED to be on when HDG hold is enabled. Test works fine, usage works fine. I have another of the LED buttons to AP MASTER toggle and the LED to indicate if AP MASTER is enabled. This also works. All of the pieces work when testing and much of the time when in use.

What I have found though is that often when I am rotating one of the encoders all of the lights (7-segment and LED buttons) will flash off then the 7-segments will turn back on (sometimes 1 of them doesn't) but the rest of the buttons will stay off. It will also happen every minute or two even if I am not touching anything.

The status in Mobiflight isn't changed and still shows that they should be lit up properly. If I open the settings for one of the LEDs then hit the OK button it will correctly turn on the LED. If I cycle the feature off then back on (HDG, AP, etc.) in the simulator then the LED status for that one LED will be corrected.

Any ideas why this might be happening, or is there any way to force resetting all of the LEDs to the correct state? It is almost like there is a very brief reset and the 7-segment displays come back but the LEDs do not. I have tried setting the execution speed very fast, middle or very slow and it doesn't seem to make any difference.

I originally also had a 20x4 LCD display connected but it was happening constantly with that connected and got better once it was removed.

Thanks,

Here is how I have things connected

Arduino Pin Device Device Pin
D0
D1
D2 ALT VS 7-Segment DIN
D3 ALT VS 7-Segment CS
D4 ALT VS 7-Segment CLK
D5 SPD HDG 7-Segment DIN
D6 SPD HDG 7-Segment CS
D7 SPD HDG 7-Segment CLK
D8 HDG Encoder SW
D9 HDG Encoder DT
D10 HDG Encoder CLK
D11 SPD Encoder SW
D12 SPD Encoder DT
D13 SPD Encoder CLK
D14 ALT Encoder SW
D15 ALT Encoder DT
D16 ALT Encoder CLK
D17 VS Encoder SW
D18 VS Encoder DT
D19 VS Encoder CLK
D20 LCD SDA
D21 LCD SCL
D22 AP Button YELLOW
D23 LDG Switch 1 Side
D24 GPS LED RED
D25 HDG LED RED
D26 ALT LED
D27 VS LED
D28 AP LED RED
D29 LG 1 GREEN
D30 LG 2 GREEN
D31 LG 3 GREEN
D32 LG 1 RED
D33 LG 2 RED
D34 LG 3 RED
D35 HDG BTN YELLOW
D36 GPS BTN YELLOW
2023-07-15 03:45
Avatar
elral
From: near EDDL, Germany
Posts: 50
On pin D13 from the mega the onboard LED is connected. Try it with another pin. But I am not sure if this is the problem.
Regards
Ralf
2023-07-15 08:49
Avatar
mobiflight@jeepin95.com
Posts: 2
Thank you for the reply, it happens with all of the LEDs and the one that that I hadn't fully setup yet even was the D13, so that was not the case. I have since removed everything and limited it down to a single LED and it still happens. Even running through the cycling test procedure it fails to turn on 25-50% of the time. The switches have a built in resistor, and I've tried with an individual LED and resistor. I do not believe it is an over current or under voltage issue. Once the LED is lit from something like the individual test button or even the sim it will stay lit. ANY other commands being sent to the Mega 2560 though may result in the LEDs turning off and not turning back on.
2023-07-16 01:23
icon