#Custom 1602 lcd display

1 messages · Page 1 of 1 (latest)

thorny adder
#

so Iam trying to use a 1602 display with this anyhelp? It is on the radio part of the autopilot panel.

onyx river
#

It requires the i2c adapter piggyback board to work

thorny adder
#

my lcd display has it soldered to it so what’s next

onyx river
#

It goes to the SDA SCL pins of the arduino I2C interface. What arduino board do you have?

thorny adder
#

I have the mega. I watched a video and I know the wiring. I just am confused on how to use it as part of the panel

onyx river
#

you have to be more specific. Which airplane is this for? Which simulator?

#

How do you want to display? Which events have you tried?

#

For radio, you can try the generic events and variables.

thorny adder
#

it is for the bredok3d f22 raptor and MSFS

onyx river
#

so did you try the generic events for radio?

thorny adder
#

Cant get it to work with the generic events is there a way I can find the custom variable. Also, in the video I watched the guy made it only display different numbers but mine is different numbers and letters for the different frequencies

onyx river
#

You can go into Msfs2020 developer mode, Behaviors and dig for the events yourself.
You are not explaining very well what is it you want to do? Watched the guy? Who? Video? Which video? Different numbers and letters?

#

I also don't know if you tried with the generic events and failed because the generic events don't work or because you made any error in configuring them.

#

I think radio frequencies are pretty much standard across all airplanes.

thorny adder
#

I got a generic event to work but it was not the one I wanted I am looking for vhfl event

onyx river
#

What is vhfl?

thorny adder
#

I dont know could it be Vhf1

onyx river
#

VHF1 = COM1

#

I can't help you if you don't give any details to what you are doing right or wrong.

thorny adder
#

so I was trying to use a custom FUSPIC OFFSET because the default ones did not work

onyx river
#

did you try the simconnect events I suggested above?

#

If using msfs2020 you don't need fsuipc, unless you are flying the PMDG 737.

thorny adder
#

So I figured out what I did wrong. I imported it the wrong way but fixed it

#

I got it to work but it wont display the right numbers. For example its displaying 567890 when it should display 124.850

#

also this button here goes through the Vhf frequencies and when I press it the numbers stay the same.

#

same for this button

onyx river
# thorny adder same for this button

I can't say it any other way, if you don't share the specifics of what and how you are doing your Mobiflight configs, there is very little that I can do or anyone else to help you. Posting pictures of the airplane radio panel does not help. We need to see screenshots of your Mobiflight configs in detail, which offsets have you used? How are you configuring your display?
I have suggested to use Simconnect events instead of Fsuipc, but you have chosen to ignore those comments.

#

Since not many people fly this F22 airplane (that I know of), you may need to get into Developers Mode, Behaviors, to dig up the correct event code that you can use. Especially if you try the generic events and they don't work, but like I said before, I think it is unlikely that the radio on the F22 uses custom events.

thorny adder
#

I used the 2 pieces of code you recemended and they worked

thorny adder
#

I dont know if this helps but it seems to be based off the 747-8 com1 panel

#

Also, do you think I need to do a precondition if I want the cycle HF frequencies and cycle VHF frequencies button to work?

onyx river
# thorny adder Also, do you think I need to do a precondition if I want the cycle HF frequencie...

If it is based on the 747-8, you can try some of the events already cataloged in Mobiflight for this airplane.
You will need preconditions if you implement the cycling of the frequencies natively in Mobiflight. However, you may not need to do that if the button in the sim has an event that does that. For example there are Simconnect generic commands that can swap standby and active frequency, and also other events to swap the com1 and com2.

#

if you need to your lcd display to show com2 instead of com1, then preconditions may be the solution. You create two display configs for the same screen, but keep only one active with a precondition. The button will set a MF variable that is used as index in the preconditions.

thorny adder
#

any recomendations of what to search because I cant really find the custom variables.

onyx river
#

One of the most common questions asked in the MobiFlight Discord is how to control something in a plane. With the incredible MSFS2020 SimConnect event support in MobiFlight pretty much anything is possible... if you can figure out what event to use. HubHop is a great resource and should be everyone's first stop when researching [...]

thorny adder
#

I found the variables

#

still digging for the code however

#

is this the code?

onyx river
#

Yes, but there is no access from outside for O: or I: or B:, so the code has to be adapted.

thorny adder
#

how do I do that?

onyx river
#

You need to analyze what is done. Take off code that reads or sets O: vars, but need to also take care of parameters being passed to K: events, or Lvars

thorny adder
#

?

onyx river
#

Do you have programming skills?

#

Are you familiar with RPN syntax?

thorny adder
#

no not really

onyx river
#

OK, I can check the code you posted later and see what is relevant

#

Please post a copy paste text version as the screen clip is barely readable.

thorny adder
#

2 (L:XMLVAR_COM_Transmit_Channel) == sp0 1 0 l0 ? (>O:AIRLINER_VHF_C_1_COM_2_Transmit_Position) and p0 0 max 100 min s0 (>O:AIRLINER_VHF_C_1_COM_2_Volume_Position) l0 100 / (>L:XMLVAR_COM_2_Volume_VHF_C_1) 1 (>I:XMLVAR_COM_UpdateVolumes) (O:AIRLINER_VHF_C_1_COM_2_Volume_Position) 3.6 * dnor (>O:_KnobAnimVar) dont know which one

onyx river
#

Which event is this?

#

It seems to be something like com2 volume

thorny adder
#

sorry gave you the wrong code. p0 1 min 0 max (>O:AIRLINER_VHF_C_1_COM_2_Transmit_Position) 2 (>L:XMLVAR_COM_Transmit_Channel) 1 (>K:PILOT_TRANSMITTER_SET) 4 (>K:COPILOT_TRANSMITTER_SET) 1 (>O:_ButtonAnimVar) 2 (L:XMLVAR_COM_Transmit_Channel) == (>O:AIRLINER_VHF_C_1_COM_2_Transmit_Position) p0 0 max 100 min s0 (>O:AIRLINER_VHF_C_1_COM_2_Volume_Position) l0 100 / (>L:XMLVAR_COM_2_Volume_VHF_C_1) 1 (>I:XMLVAR_COM_UpdateVolumes) (O:AIRLINER_VHF_C_1_COM_2_Volume_Position) 3.6 * dnor (>O:_KnobAnimVar)

#

these are both I think

onyx river
#

The code should come from the set tab, understood?

#

Does it?

thorny adder
#

yes this is from the set tab

onyx river
#

for the first block of code
2 (>L:XMLVAR_COM_Transmit_Channel) 1 (>K:PILOT_TRANSMITTER_SET) 4 (>K:COPILOT_TRANSMITTER_SET)

#

the rest we can't do anything about it.

#

this looks like it is setting COM2 as the active channel

#

you really should tell me what the events are supposed to do.... I am just guessing

#

For the second block of code.... which appears to set the volume in COM2

#

assuming you will use a potentiometer to set the volume
@ 1023 / (>L:XMLVAR_COM_2_Volume_VHF_C_1)

thorny adder
#

i dont know what they do I was just asuming they are the active and standby freaquwincy

onyx river
#

Ok, I don't have the airplane, so I can't really look for anything to help you. I have to rely on you to provide the correct events. I am sorry, but I am not going to be working with just randomly selected events until you by chance happen to hit on the correct one. Sorry but that is not how things work. You need to learn how to do this.

thorny adder
#

if I give you screenshots can you help me find the variable

onyx river
#

hadn't you said the active and standby generic variables worked ok?

thorny adder
#

yes but only for vhf-l not for the other ones

onyx river
#

I will give you a tip on how to find things a bit better

#

with Dev Mode Behaviors open in the Behaviors tab

#

if you hover over a control on the virtual cockpit (blue glow) and press ctrl-G, the control will be automatically selected in the Behaviors window. This works ok in most airplanes. There are a few that don't work (like the FBW A320).

#

and there are a few instances where the wrong control is selected... but for the great majority of times, this works ok.

thorny adder
#

what do you mean by virtual cockpit (blue glow)

onyx river
#

virtual cockpit is the on screen cockpit in the sim

thorny adder
#

oh

#

it doesnt open anything

onyx river
#

when you move your mouse, the controls turn blue

#

do you have Behaviors open

thorny adder
#

yes and I am hovering over the screen

onyx river
#

the controls turn blue when you hover over them?

thorny adder
#

the buttons yes. but the screen no

onyx river
#

yes the virtual buttons

#

with the button glowing blue, press Ctrl-G in your keyboard

thorny adder
#

ok but then how do I get the variable for the screen

onyx river
#

what is the variable for the screen? what do you mean?

#

was the control selected in Behaviors????

thorny adder
#

the generic code works for vhf-l but I am trying to get the code for vhf-c and vhf-r because the generic does not update for them

onyx river
#

I am just trying to explain how YOU can first locate the correct control in the sim

#

if you hover over the vhf-c or whatever button, then it should be selected in Behaviors.... that is your starting point to see what the sim is doing with that button

thorny adder
#

ok

onyx river
#

I already gave you yesterday the link to the guide by Neil on how to uncover events. I hope you read it and learn it.

#

You are one of the few flying this airplane, so you will not be getting much help from other users using the same aircraft.

#

that means you will most likely need to learn how dig more than a few events yourself to get your panels to work.

thorny adder
#

Do you have any generic com2 standby and active frequencies codes?

onyx river
#

same code

#

just change the index from 1 to 2

thorny adder
#

how do I do that?

onyx river
#

If you look at your config using the event Com1, where you used an index of 1. Please note what it says in the description, that the index can be 1 or 2. So just change :1 to :2.

thorny adder
#

I figured out the display variable COM1 = VHFL COM2 = VHFC COM3 = VHFR