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
rendyraj
Posts: 19
hello there, i want to ask some question:
i want to add lcd arduino to read my degree with rotary encoder for trim wheel the problem are :

1. can i just uploaded the code directly to arduino mega? or i need use another arduino which is uno and the combine in bread board?
thats mean i have 2 arduino :-uno for lcd and also - the arduino mega ofcourse to encoder trim wheel (already working)

2. or are in the mobiflight already have the way to make it? so i dont need the arduino uno to build. ( i mean in arduino mega there 2 function :1. for rotatry encoder and 2. lcd)


thank you
2020-01-03 08:09
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

At first please not request same thematic in two topics..... And i´m a bit confused why you ask again cause you get the awnser still in other topic.

Whatever lets talk.....

1. UNO
Arduino UNO is not supported by Mobiflight directly.... You can use it on own risk. Some things work, other things wont work.
We do no longer support help requests here. For a perfect working System use ONLY Arduino MEGA´s. Thats high recommend.

****

2. Dual usage on the Mega.
Mobiflight support a free mixing of devices ( within the limits).
So you can set on a Mega whatever you like.... Switches, Buttons, Encoders, LED, /Segments, LCD Displays, Servo Motors and Stepper Motors.
In easy words... YES You can set a LCD via IC2 ( Pin 20/21 = IC2 Ports ) and also your encoder ( for example on Pin 10 and 11 )

****

3. About Trim Wheel-Encoder-LCD Question.
Maby you missunderstand.... Mobiflight NEVER combine Inputs and Outputs together. Both things are completly indipendend and standaloane.

That means for Mobiflight its no matter what you show on your Display or what you set with your encoder.... Cuase the Display will NOT show the status of your Encoder itself.
Inputs will WRITE a Information to the Sim
Outputs will READ a Value from the Sim and show it on a device.

So if you turn your encoder then it send commands to Sim that will change the Trim Wheel Position.
The LCD Display finaly will read a OFFSET that shows us the current Position of TrimWheel in Sim and you can show this Value on your Display.

*************
Hopefully this awnser your question..... If NOT please tell us more detailed what you like to build. Then we can find a solution for you.
Good Luck !
2020-01-03 14:35
Avatar
rendyraj
Posts: 19
hey, before that sorry for my mistake:)

so my project is about making trim wheel with rotary encoder, which is the project already success i can run it.
besides that, i want to add lcd to read the degrees of trim wheel which make it cooler for me hahaha,

btw, what i confused is i have only 1 arduino mega that already used for trim wheel right, and now i want to add lcd display to read the degrees, can i used 1 arduino mega for 2 input?based on what u said the input is no limited.

what i afraid is if i input lcd and trim wheel from MF in mega and run it , let's say both of output not coming out or only one of them can run ( like when i rotated the encoder only trim wheel can showing the move from simulator but the lcd not coming out anything). I want it when I turn the encoder together the results will come out like a trim wheel in the simulator will move as well as the LCD that will issue a value. possible or not?


correct me if im wrong
2020-01-04 07:35
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi again my friend.

I think our problem is the translation. Your english ( pretty sure by google translator) is verry poor. But keep cool. My English is not better i think ;)
So hopefully i understand you correct and you also understand my reply.

You still not understand the main System of Mobiflight..... so i try to explane again.

If you use a MEGA in your System then Mobiflight will detect it and flash its firmware.... Then the Mega change into a "Mobiflight Board" .
This Megas now can include a mixup up different Elements. YOU Define this in the device settings.
For example you can Set up to 50 Buttons ..... Up to 20 Encoders ..... Up to 40 LED ..... Up to 2 LCD .... UP to 4x8 7Seg Displays .... 10 Motors and so on.
The "Mixing" is also limmited by the Pins. You got 51 Pins... So you can use for example 30 Buttons 5 Encoders and 11 LED ( Within each limit and within overall Pin Limit)


About your logic Question....
Inputs and Outputs are working same time on a Board.... Cause Mobiflight will "update and scan" all stuff multiple times per second.

Here the OUTPUTS are as i said indipended from the Inputs.
Mobiflight just "ask" the sim 5-10 times per second "What position is the Trim Wheel in Virtual Cockpit" and it will show the result on your LCD Display.
If you change the Trim Wheel Position ( Whatever with your Encoder or by Mouse in virtual Cockpit) then this Value change and Mobiflight NOW show the new value on the Display.

So... Summary. Outputs work fine.... Whatever you make inputs same time.
Good Luck !
2020-01-04 14:54
Avatar
rendyraj
Posts: 19
hey, i understand now, sorry make you in trouble hehehe

by the way, if i want to add the lcd how to make the output in lcd showing a degree of rotation trim wheel, which one of load preset i need to choose it from the option. because trim wheel itself can be linked to vertical.

because what i know if someone adds the lcd in their project it can showing another indicator like vertical , airspeed, etc.
[Last edited by rendyraj, 2020-01-05 11:39]
2020-01-05 04:40
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
The Preset is just a FSUIPC Value..... From Standard Offset Table.

If you use a AddOn then maby this include a own Offset. In that case you must create your Output Config by hand..... So not choose a preset. Simply insert the Informations ( Offset Adress, Typ, Size and so on) by hand.

By the way..... For PMDG B737 as example we use also this Preset Offset BUT we include a little transform line to make this value identical to the shown value in Virtual Cockpit.
In case this is a linear INT Value you can simply change it by add or sub a number or by rounding.
Good Luck !
2020-01-05 09:26
Avatar
rendyraj
Posts: 19
hey again,

i have little bit problem, while i making trim wheel and run it the elevator and trim itself it okay, but the problem is while i rotate my rotary encoder going up it showing to fast and when i i try to rotate down it showing slowly . may i know how to solve it?

another one which one is better encoder ky 040 with 5 pin or another encoder with 3 pin
2020-01-12 18:32
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Basicly Both Encoders work same way.

If your input act different whatever you turn left or right, pretty sure your Settings are wrong.

Please check if you use correct EventID or Values for Offset write. Normaly that should be the same "feeling" for both directions if you use correct values.
Good Luck !
2020-01-13 00:57
Avatar
rendyraj
Posts: 19
hey, i want to ask some question about trim wheel project

how i can calculate or know the resolution of rotating the trim wheel (rotary encoder)
2020-01-15 11:28
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
:confused: Resolution ?

You mean how many full turns your weel must do to controll Value from lowest to highest point ?

If yes check the virtual aircraft.....
Turn wheel to endstop .... Check Value turn it 360° and check value again so you know nearly the increase for 1 turn.
Then turn it to other Endstop and count every 360° Turn to find out the number of circles.

Alternate.... Check a real aircraft or google for other cokcpit builders who know for example how many turns a real B737 Wheel will do.

Finaly..... If you know the number and detents from Encoder you can calculate

For example 24 Detents 24 Signals (1:1) means your Encoder send 24 Signals in one round.
Your wheel should turn 12 Times from 0 to Full.
24*12=288 Detents
The Value goes for example from 0-16383
16383/288=56,88541 ~~ 57
So your encoder must write Offset to $+/- 57

*******
Alternate is a Mechanical solution with Cogwheels.
If you use Event ID and your Encoder turn 2 circles from lowest to highest point .... But you like that this should be 8 Turns then you set a 1:4 Gogwheel to make this working.
Good Luck !
2020-01-15 11:45
icon