Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    New Member
    Join Date
    Oct 2015
    Location
    Italy
    Posts
    2
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Airbus PMDG 737 NGX MCP Arduino Mega

    Hi, I'm looking to build an mcp for the PMDG 737, I've got Arduino Mega (No Ethernet), can someone share the skratch for Arduino? I don't know nothing about programming. Are there tutorial step by step to help me with this project?
    Thank You
    Simone

  2. #2
    10+ Posting Member
    Join Date
    Sep 2012
    Location
    Memphis Tennessee
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: PMDG 737 NGX MCP Arduino Mega

    Hello,
    I haven't actually started with the arduino yet but I believe a program called link2fs could help you. You can find it here http://www.jimspage.co.nz/intro.htm.
    You should look into it. It is free!
    Good luck!!

  3. #3
    150+ Forum Groupie
    Join Date
    Nov 2013
    Location
    Evansville, Indiana
    Posts
    243
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: PMDG 737 NGX MCP Arduino Mega

    simonino993,

    Coming from a Zero knowledge starting point, you have chosen to learn mountain climbing by going to Everest.
    The PMDG is not easy to code for because it uses a bunch of proprietary commands and L-variables. Link2FS was primarily designed to work with stock aircraft commands and variables.

    Later on, Jim put in an "experts" section in Link2FS to help bridge the gap for aircraft like the PMDG.
    You are going to have to learn a lot to produce an MCP for the PMDG.
    After I started building mine for the PMDG, I into issues and decided to code it for the MilViz 737-200.
    I know enough now to be able to code it for the PMDG, but if and when I do, I will interface it with a LUA script and skip Link2FS all together.
    LUA is another mountain of its own.
    My MCP for the MilViz was not without pitfalls. I had to utilize a second arduino to pass and receive things from a LUA script that talks to FSUIPC. It is fully functional now.

    If I had it to do again, I would go all Arduino to LUA and cut out Link2FS.

    My recommendation to you is to start small and work your way up. Look at Jim's sample code. Use it to try some small projects like a Gear light indicator. You need to learn how information gets passed from Arduino to Link2FS to FSX and then back again.

    ~Fess
    I will only ever be, half the Geek that I wished I was.
    TheGeekForge.Com

  4. Likes BuzziBi liked this post
  5. #4
    New Member
    Join Date
    Oct 2015
    Location
    Italy
    Posts
    2
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: PMDG 737 NGX MCP Arduino Mega

    Ok...Thanks...and about the leo bodnar card?

  6. #5
    75+ Posting Member
    Join Date
    Aug 2015
    Location
    Montreal
    Posts
    106
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: PMDG 737 NGX MCP Arduino Mega

    Quote Originally Posted by Fess_ter View Post
    If I had it to do again, I would go all Arduino to LUA and cut out Link2FS.
    I am in the process of building avionics on arduino, and started by using link2fs. But I am reading more and more people suggesting Lua. Is Lua documented in fsuipc? Or where would be the best place to get documentation on how to Lua between fsx and arduino?
    Thx.

  7. #6
    150+ Forum Groupie


    BushPilotWannabe's Avatar
    Join Date
    Jan 2014
    Location
    Alberta, Canada
    Posts
    176
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: PMDG 737 NGX MCP Arduino Mega

    Climbing Everest certainly, but the view from even lower levels is worth the time banging your head on the workbench. Enjoy.
    ---CYXD ----- TWR --- GND ------ Closed
    ILS-- NDB -- 119.1 -- 121.9 ---- 11/2013

  8. #7
    150+ Forum Groupie
    Join Date
    Nov 2013
    Location
    Evansville, Indiana
    Posts
    243
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: PMDG 737 NGX MCP Arduino Mega

    Quote Originally Posted by SimSupervisor View Post
    I am in the process of building avionics on arduino, and started by using link2fs. But I am reading more and more people suggesting Lua. Is Lua documented in fsuipc? Or where would be the best place to get documentation on how to Lua between fsx and arduino?
    Thx.
    Link2FS is an excellent place to start and should work well with Com and Nav radios.

    There is a LUA guide in the FSUIPC documents but it was difficult for me to understand completely because I had no prior LUA experience.

    What I had to do was find someone else's work, take it apart and put it back together. Then the cogs started clicked into place.

    One of the essential tools needed for programming LUA for FSX/P3D, is a program called LINDA.
    LINDA has many functions for programming joystick buttons to cockpit switch assignments. However, I didn't care about all of that. LINDA has a discovery function (that requires a little trial and error) to display the names of L_variables and Control Code numbers.
    Once you learn the variables and codes you can manipulate them in a LUA script.

    Here is a sample part of my LUA script for the MilViz 737-200.
    Com8 is the comport of the Arduino, I have since modified the code to let the user manually enter the com port.
    In the "while" loop, it looks for characters from the com port and then assembles them into a string "red_string".
    The "ipc" commands are the FSUIPC adaptations for LUA.
    "A61" and "A60" is what I send from Arduino to have the script change the Lvar, B737_MaxBankKnob. It can be 0,1,2, or 3.
    It turns the bank angle knob in the aircraft and establishes the max bank the autopilot will do in a turn.
    Code:
    speed = 115200
    handshake = 0
     
    dev = com.open("COM8", speed, handshake)
    if dev == 0 then
        ipc.display("Could not open device port")
        ipc.exit()
    end
    
    
    while 1 do
        red_string = ""
        char = ""
        if (com.test(dev)>0) then
            n = com.test(dev)
            while(com.test(dev)>0) do
                char = com.read(dev,1)
                red_string =  red_string..char
                ipc.display(red_string)
            end
        end
        if (red_string == "A61") then
            MaxBankKnob = MaxBankKnob + 1
            if (MaxBankKnob > 3) then
                MaxBankKnob = 3
            end
            ipc.writeLvar("B737_MaxBankKnob", MaxBankKnob)
        end
        if (red_string == "A60") then
            MaxBankKnob = MaxBankKnob - 1
            if (MaxBankKnob < 0) then
                MaxBankKnob = 0
            end
            ipc.writeLvar("B737_MaxBankKnob", MaxBankKnob)
        end
        -- Sleep for 50 mSecs so the update gets done roughly 20 times per second
        ipc.sleep(50)
    
    
    end
    ~Fess
    I will only ever be, half the Geek that I wished I was.
    TheGeekForge.Com

  9. Thanks SimSupervisor thanked for this post
    Likes SimSupervisor, BuzziBi liked this post
  10. #8
    10+ Posting Member
    Join Date
    Jan 2013
    Location
    UK
    Posts
    18
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: PMDG 737 NGX MCP Arduino Mega

    Can I suggest you have a look at my very recent thread http://www.mycockpit.org/forums/showthread.php?t=29966 "Radio Stack and Auto Pilot for FSX".

    There is a whole bunch of Arduino code included in the posts which may help you.

  11. #9
    New Member
    Join Date
    Mar 2008
    Location
    Netherlands
    Posts
    3
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: PMDG 737 NGX MCP Arduino Mega

    If you are still looking for an answer to control the PMDG NGX?
    Look at: https://phpjj.wordpress.com/arduino-...o-pmdg-events/

    Edit: See below for my next reply.

  12. Thanks dannygp87, BushPilotWannabe thanked for this post
    Likes dannygp87 liked this post
  13. #10
    New Member
    Join Date
    Nov 2015
    Location
    Spain
    Posts
    1
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: PMDG 737 NGX MCP Arduino Mega

    PHPJJ, that's absolutely wonderful, thanks!

Page 1 of 2 12 LastLast