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
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 22
Hi, I’m trying to wire four encoders on an Arduino Leonardo for a transponder. These are the encoders:

https://www.mouser.com/ProductDetail/706-25LB45-Q

I chose these because they have 8 detents. The Leonardo is wired as such:

Encoder 1 A - pin 13
Encoder 1 B - pin 12
Encoder 2 A - pin 11
Encoder 2 B - pin 10
Encoder 3 A - pin 9
Encoder 3 B - pin 8
Encoder 4 A - pin 7
Encoder 4 B - pin 6

They don’t register on MobiFlight debug log, or on the Leonardo’s leds unless the Type is set to “4 detents per cycle,” but they don’t send a signal out of MobiFlight.

Are these the wrong type, wrong wiring?

Thanks!
2020-03-03 03:18
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconmonkeysuncle:

Hi, I’m trying to wire four encoders on an Arduino Leonardo for a transponder.



Mobiflight support official ONLY Arduino MEGA Boards.

I wondering how you be able to install Firmware and devices without errors.
The Leo have only 32kb Memory instead of 256kb at the Mega ..... I think this is already a NoGo.
Good Luck !
2020-03-03 03:33
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 22
(edited for clarity)

Thanks for the fast reply!
This is getting more intriguing. Here is the back story:

I have two devices using encoders: My gauge panel with 7 encoders (with buttons), and my transponder with 4 encoders (no buttons). I did the Gauge panel first. I was trying to use some Leonardos that I had on hand. I could get 4 encoders working on one, but no more. Working through MobiFlight, that is. I was tired of tinkering so I decided to just use 2 Leos and put 4 on one and 3 on the other (they are small and cheap, after all). It was working fine. But, as I was installing to panel, the mini USB port on one of them got damaged. So I scrapped the two Leos and moved all 7 encoders to a Mega. Installed and tested, all working well.

Now, with the knowledge that I got 4 encoders working on a Leo, I then chose to use the other Leo on the transponder. This is what led up to my initial posting yesterday.

Using what you've told me in your reply, I moved the 4 encoders from the Leo to a Mega, same pin assignments. I get the same results as before: When I operate an encoder from another device through MobiFlight, the feedback in the logger says "Config found for encoder....etc," then "Executing Event...etc."

Now, with the Transponder, the only way I can get any feedback in the logger window is to set an encoder Type to “4 detents per cycle." All other Type settings produce no feedback at all. (Feedback also means blinking LED on the Mega board) However, when I DO get feedback, it says "Config found for encoder....etc" but doesn't say "Executing Event...." So, I'm back to where I was before.

Maybe I have the encoders wired incorrectly, I'll have to open it up and check. Can you verify that the encoders I am using are correct?
dave
[Last edited by monkeysuncle, 2020-03-03 17:29]
2020-03-03 15:26
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
The Encoder looks good.
Also the 4:1 Setting looks good on first view.

The reason why it not work is pretty sure the Board.
Its Interesting that "some" elements still work with Mobiflight on a Leonardo ( Thought this is basicly not posible) .
Whatever.... This is just lucky.

For Example .... You use a random electrical charger for your smartphone instead the certificated compatible one.
Maby it charge your mobile.... Maby Not ..... Maby it charge it but verry slowly.... Maby it burn down your Phone within seconds.
Nobody knows.... You can test it but on own risk.

So.... We can not tell you what happen if you do your requested logic.... Cause we not think about the usage of Mobiflight on Boards except MEGA.


By the way.... A Mega Board NOT must be a original Arduino..... You can use Clones, too. Normaly we pay less then 10 US$ per Board.
Summary i reommend to use Megas.... Then you have no Problems !
Good Luck !
2020-03-04 07:05
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 22
Following the advice in your first reply, I am not using the Leonardo anymore. It’s all now on a Mega. The problem is still the same, as I describe in my reply above.
2020-03-04 11:25
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Sorry.... Translation issue..... I thought problem is solved after switching to Mega !

In case i can not directly reproduce the situation you need to do some testing.

To get sure there is no Problem somewhere in existing files....
Create a NEW Config File.....
Only create ONE Config Entry in Input section
Use a Encoder that was problematic in your current system.
Then use a absolutly rudimentary function.
For example for On Left and On Right use the EventID to change Com1 Megaherz ...
iconQuote:

COM RADIO WHOLE DEC 65636 ----------- COM RADIO WHOLE INC 65637


Then Run Mobiflight and Sim and use a Stock Aircraft.
TEST


Please confirm this work or not.
Good Luck !
2020-03-04 11:45
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 22
Will do, thanks. It may take a day or two to get find some free time. :)
2020-03-04 15:32
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 22
I am this biggest idiot. I neglected to check the "active" box for the 4 events. I'm trying to do too many things at once.

It's working fine now, except one of the encoders skips and reverses at the same point it it's rotation. I'm assuming it is bad and needs to be replaced.

Thanks for everyone's kind help. I'm so embarrassed.
Dave
:blush:
2020-03-05 19:35
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
No prob... Shit happens !
Nice it work now. Not care about that issue.... In the future this will not happen again cause you now know it.... We all startup at that point, long time ago !

Off Topic:
Just read your from Lake Peekskill, NY.... I feel a little bit sad, now !
Your just 1 Hour North of the most fantastic place at this world! I be glad to say i already visit NYC two times in my life..... And hopefully i will see it a third time in the future as god will allow me....
All my life (as a teenager) i got the dream to stand on the WTC ..... But after 9/11 this was no longer possible.... So on my first trip i "just" stand on the remaining highest building..., The Empire State..... But 2018 on my second trip i finaly stand on the meanwhile already opened New World Trade Center...... One of the most impresiv and also touching moments in my life.

Nice to meet you my friend !


EDIT:

Whatever its completly OffToppic.... This is nessesary now ..... https://www.youtube.com/watch?v=UclSNeLc2aI
[Last edited by pizman82, 2020-03-05 21:45]
Good Luck !
2020-03-05 21:39
icon