Arduino = Airplayer

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
freddehboy
Posts: 23
Joined: Fri Jun 16, 2017 10:05 pm

Arduino = Airplayer

#1 Post by freddehboy »

Hi

I am bulding a Flightsim panel for the Boeing 737, specific for PMDG 737NGX (P3D 4)

Except for Rotary Encorder, Buttons, Switches I have Led-Segment and Led-Display. I will check I have the basic components that will work :)

Have some Arduino Mega 2560 R3 board. Can I make function just I can with Mobiflight ?

Am I able to make some Conditions that is behave in one way according too a switches State like Precondition?
____________________________________________
Computer: Windows 10, 64-bit, Intel i7 8700k, Asus ROG STRIX Z370-F GAMING, 16GB RAM and Asus GTX1080

Game control: Razer Nostromo, Keyboard, Saitek Pro Flight X-56 Rhino H.O.T.A.S.

SimPassion
Posts: 5339
Joined: Thu Jul 27, 2017 12:22 am

Re: Arduino = Airplayer

#2 Post by SimPassion »

Hello @freddehboy

it seems you can find the way to make the MAX7219 module work here : https://www.mobiflight.com/de/tutorials ... zeige.html
still have to translate if English spoken
or you also get some infos here : https://www.mobiflight.com/forum/category/9.html in English

Regards
Gilles

freddehboy
Posts: 23
Joined: Fri Jun 16, 2017 10:05 pm

Re: Arduino = Airplayer

#3 Post by freddehboy »

Hi

Am look for running my cards by Airmanager :)
____________________________________________
Computer: Windows 10, 64-bit, Intel i7 8700k, Asus ROG STRIX Z370-F GAMING, 16GB RAM and Asus GTX1080

Game control: Razer Nostromo, Keyboard, Saitek Pro Flight X-56 Rhino H.O.T.A.S.

SimPassion
Posts: 5339
Joined: Thu Jul 27, 2017 12:22 am

Re: Arduino = Airplayer

#4 Post by SimPassion »

Sorry, not always understanding English sentences properly while reading

So the answer is yes you can do all, once you have the skill for coding in C++ for Arduino and also in easier way with HW Air Manager API
and Air Manager already handle MAX7219 so your own module seems perfectly fine

for the LCD I've planned some future testing but can't confirm for the moment (unless I will accelerate its use for personal current debugging needs)
so other could perhaps help you on this as many are already using different components in their own projects

Regards
Gilles

User avatar
Ralph
Posts: 7924
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Arduino = Airplayer

#5 Post by Ralph »

For PMDG related variables and events check out our wiki: https://siminnovations.com/wiki/index.p ... arch&go=Go

User avatar
Sling
Posts: 5239
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Arduino = Airplayer

#6 Post by Sling »

freddehboy,

You can do all that you want with Air Manager but you will need to learn to use the API functions. LCD character displays are not supported by the standard API functions at present but support is coming and you can still use the message port feature for any hardware that is not supported. If you can control it from an Arduino then you can use it with Air Manager.

Can I ask what you intend to use the LCD for in your cockpit?

Tony

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Arduino = Airplayer

#7 Post by Keith Baxter »

This is what is currently supported.

https://siminnovations.com/wiki/index.p ... isplay_add

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

freddehboy
Posts: 23
Joined: Fri Jun 16, 2017 10:05 pm

Re: Arduino = Airplayer

#8 Post by freddehboy »

Hi

It won´t be a problem for me :)

I hav e look at the Wiki but I cannot read where to start, mean a step to steg guide, The Arduino card is recongnized by airmaner. Do you have som topic in the forum helping newbies :)
____________________________________________
Computer: Windows 10, 64-bit, Intel i7 8700k, Asus ROG STRIX Z370-F GAMING, 16GB RAM and Asus GTX1080

Game control: Razer Nostromo, Keyboard, Saitek Pro Flight X-56 Rhino H.O.T.A.S.

freddehboy
Posts: 23
Joined: Fri Jun 16, 2017 10:05 pm

Re: Arduino = Airplayer

#9 Post by freddehboy »

Hi

I have just starting the program a lua file but Am I have needing to program a sketch for arduino?

I think so but I do not find anything about sketches for Airmanager and Arduino except for this example: https://siminnovations.com/wiki/index.php?title=Arduino

I am lost but you have to point me at the correct direction :)

Best Fredrik
____________________________________________
Computer: Windows 10, 64-bit, Intel i7 8700k, Asus ROG STRIX Z370-F GAMING, 16GB RAM and Asus GTX1080

Game control: Razer Nostromo, Keyboard, Saitek Pro Flight X-56 Rhino H.O.T.A.S.

SimPassion
Posts: 5339
Joined: Thu Jul 27, 2017 12:22 am

Re: Arduino = Airplayer

#10 Post by SimPassion »

You can watch a short sample here : \Users\%username%\Documents\Arduino\libraries\SiMessagePort\examples\BasicExample
combined with statements like this (two samples), to process values sent from lua script with "hw_message_port_send"
and receive in LUA script from Arduino with "messagePort->SendMessage" :

Code: Select all


int my_variable_int = 0;
String my_variable_string = "";

.../...

// We received a message from Air Manager or Air Player

if (payload == NULL)
{
messagePort->DebugMessage(SI_MESSAGE_PORT_LOG_LEVEL_INFO, (String)"Received without payload");
}
else
{
switch(payload->type)
{
case SI_MESSAGE_PORT_DATA_TYPE_BYTE:
messagePort->DebugMessage(SI_MESSAGE_PORT_LOG_LEVEL_INFO, (String)"Received " + payload->len + " bytes: " + payload->data_byte[0]);
break;
case SI_MESSAGE_PORT_DATA_TYPE_STRING:
messagePort->DebugMessage(SI_MESSAGE_PORT_LOG_LEVEL_INFO, (String)"Received string: " + payload->data_string);
my_variable_string = payload->data_string;
messagePort->SendMessage(message_id, my_variable); // String to be send for processing to AM/AP
break;
case SI_MESSAGE_PORT_DATA_TYPE_INTEGER:
messagePort->DebugMessage(SI_MESSAGE_PORT_LOG_LEVEL_INFO, (String)"Received " + payload->len + " integers" + payload->data_int[0]);
my_variable_int = payload->data_int;
messagePort->SendMessage(message_id, my_variable_int); // Int to be send for processing to AM/AP
break;
case SI_MESSAGE_PORT_DATA_TYPE_FLOAT:
messagePort->DebugMessage(SI_MESSAGE_PORT_LOG_LEVEL_INFO, (String)"Received " + payload->len + " floats" + payload->data_float[0]);
break;
}
}

.../...
Gilles

Post Reply