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! 

icon
Avatar
waelsalh
Posts: 7
Hi mobiflight Owner

Greetings and appreciation
First of all,
I would like to thank you for your great efforts in this program
Secondly,
My question is …About adding analog pins as digital To (Mega 2560) is not working as it should in the version (7.8.2) last Firmware.
I use it as (Button) in the PMDG CDU … pins 2 to 53 are working regularly …But from 54 to 69 not working completely and no response when I press the key Button... help please.

Thanks again
Weal Saleh
2019-12-14 13:38
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1443
Hi there! I am currently without access to my computer and can’t troubleshoot anything.
Can someone else confirm this issue?
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-12-15 00:32
Avatar
StephanHo
From: EDDG, Germany
Posts: 1525
Supporter
Hi everyone,

Configuration:
MF 7.8.2
FW 1.9.2

I did the following:

- MF started - with active file (standard)
- Menu -> EXTRAS -> SETTINGS -> MOBIFLIGHT MODULE opened
- the first module found is opened
- ADD DEVICE executed
- new switch (name: SW60) added
- Upload to the module -> OK
- Leave MF
- MF started
- Menu -> EXTRAS -> SETTINGS -> MOBIFLIGHT MODULE opened
- SW 60 is available
- switched to the main screen
- Inputs tab activated
- SW60 assigned to the module and preset loaded (66181;0)
- Config saved via menu -> SAVE (new name)
- looked in the .mcc file, SW60 is not available
- The number of characters in the new .mcc file is identical to the previous .mcc file
- another file loaded (without SW60)
- reloaded file that should contain SW60
-No config for SW60 available - therefore not saved

I repeat this with Devices on pin 54, 55 and 60 - same result.
I've not tested in the pre-saved Version if the button(s) are recognized and working.

Seems, that configs for the pins greater than 53 will not be saved in .mcc-file
Grüße,
Stephan
2019-12-15 13:00
Avatar
tomPA
Posts: 38
Hi,

ive encountered a similar probem. Ive already updated two mega clones with the new fimware.with LED´s installed on pins A0 to A7.
Only A0 to A3 are full powered while A4 to A7 (and probably A8 to A15?) are not very bright at all as if the output voltage of the pins seems to be too low (Didnt measure that, just speculation). They can be switched on and of by the mobiflight software, but are much to dark.
Both megas have 1: 29 inputs/29Outputs, 2:20 inputs/34Outputs/1segment attached and activated.

found this on the web
iconQuote:

Reference > Language > Functions > Digital io > Digitalwrite
digitalWrite()
[Digital I/O]
Description

Write a HIGH or a LOW value to a digital pin.

If the pin has been configured as an OUTPUT with pinMode(), its voltage will be set to the corresponding value: 5V (or 3.3V on 3.3V boards) for HIGH, 0V (ground) for LOW.

If the pin is configured as an INPUT, digitalWrite() will enable (HIGH) or disable (LOW) the internal pullup on the input pin. It is recommended to set the pinMode() to INPUT_PULLUP to enable the internal pull-up resistor. See the Digital Pins tutorial for more information.

If you do not set the pinMode() to OUTPUT, and connect an LED to a pin, when calling digitalWrite(HIGH), the LED may appear dim. Without explicitly setting pinMode(), digitalWrite() will have enabled the internal pull-up resistor, which acts like a large current-limiting resistor.



cheers

Tom
[Last edited by tomPA, 2019-12-15 17:14]
2019-12-15 16:45
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1443
Hey Tom! I haven’t seen you in ages.

Sorry guys that there seems to be an issue with this.
I will be back next Thursday and then I will be able to take a look at this. I am confident that saving and loading Config should be easy to fix.

In regards to driving LEDs and switches - I am not sure whether there are limitations - I used the Arduino documentation for reference and it says that any analog pin can be used digitally just like the other digital pins too.
Looks like this might actually not be the case. Sorry for that.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-12-15 17:48
Avatar
tomPA
Posts: 38
Hi Sebastian,

stil working on the overhaul of my entire A340 HC. The next big issue is almost finished, the new overhead panel. Except for analog axis, everything runs on 9 Arduinos.
If you cannot fix A4 to A7 LED output, please keep the possibility for them. My overhead relys already to them...

cheers

Tom
2019-12-15 18:58
Avatar
auransbey
From: ROME, Italy
Posts: 59
Hello everyone,
in fact I also tried, after 7.8.2, to use pins A0-A15 as input.
I have verified that they do not seem to work.
since my 11 cards have already been used with the normal 53 pins I have not considered it appropriate to raise a problem for sebastian that is already very busy to make us all happy.
as always, thanks for everything.
MF - simply wonderful !!
2019-12-15 19:30
Avatar
waelsalh
Posts: 7
Is there any progress or news regarding this case?

Thanks
Weal Saleh
2019-12-21 20:54
Avatar
StephanHo
From: EDDG, Germany
Posts: 1525
Supporter
Hi together,

mistakes are there to be made. So also with me.

Realized that I didn't install MF7.8.2 as an admin. But since the previous version was installed with admin rights, some things went wrong here and the behavior that I described above showed.

After I installed MF7.8.2 with admin rights, the above things were repeated again and everything went perfectly.
Sorry, I'm not without mistakes either.
Grüße,
Stephan
2019-12-21 22:20
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3524
Supporter
Hi Guys.

Pretty Sure Sebastian will check the Analog Pins within the next time..... Otherwise i will do this in January.
Hopefully we can find and solve maby existing problems there..... Whatever we pretty sure can finaly make clear definition what is possible or not.


So Apollogy for confusion and delay..... Also A Programmer like Sebastian got a family and celebrate Christmas..... Give him some Days !
Good Luck !
2019-12-23 09:21
Avatar
waelsalh
Posts: 7
Hi to all
happy new year .... thanks for your effort
wael saleh
2019-12-23 10:07
Avatar
herly
Posts: 67
Hallo Stephan or Pizman,

I tried also the analog pin, but there is no response at all...is there any special setting. I installed the latest version using admin as well...

Thanks in advance..
Herly
2020-01-26 17:43
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3524
Supporter
Hi

As i wrote on WhatsApp..... Problem under invetigation.
Hopefully Sebastian will check/confirm Problem within the next days/weeks and fix it if possible.
Good Luck !
2020-01-26 23:12
icon