1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

P3D Arduino

Discussion in 'Prepar3D' started by scubakobe, 24 Sep 2016.

  1. scubakobe

    scubakobe

    Joined:
    27 May 2006
    Messages:
    305
    Country:
    us-california
    Hi all,

    I've been developing a program to interface Prepar3D with Arduino in support of my final university design project. In the past I came across an application that would do this, but I believe it was for purchase or did not have the functionality I required.

    It's just a very small portion of my project, so it will be far from elegant. My goal is to allow a user to populate their own data packets for transmission to the Arduino and from there process it as desired.
    I am just curious if this is something that the community would be interested in, and if so, I'll post it and try to keep it updated.

    As of now I can send data to the Arduino from Prepar3D, and receive data back from the Arduino (if for nothing else but debugging).

    Thoughts?

    -Kobbe

    [​IMG]
     
  2. ronh

    ronh

    Joined:
    2 Nov 2006
    Messages:
    827
    Country:
    canada
    I for one would be interested in this project. Looking for an introduction into how you would interface with the Arduino device. If you are willing to share the source code and any wiring diagrams, thanks

    PS but careful you may become the resident expert on this and have to field all my questions ;)
     
    Last edited: 25 Sep 2016
  3. scubakobe

    scubakobe

    Joined:
    27 May 2006
    Messages:
    305
    Country:
    us-california
    Ideally, I would be sending structs between the PC and Arduino but it has been hard to debug on the Arduino end. I've sent structs over UDP using #pragma pack but not serial COM. So right now I'm basically packing a string and sending it over to the Arduino. Need to optimize the communication with some handshaking but it works as is.

    Working on getting a git repo going for the project so you can pull in the code and take a look.
     
  4. GaryGB

    GaryGB

    Joined:
    23 Dec 2005
    Messages:
    3,022
    Country:
    us-illinois
    Hello Kobbe and Ron:

    One of my FS multi-player flyer acquaintances is a retired engineer and a FS avionics peripheral tinkerer, who mentioned his work with project resources for a "Link2FS" and "Arduino" interface for FS by a knowledgeable fellow in New Zealand; perhaps this might be of some interest ? :idea:

    http://www.jimspage.co.nz/intro.htm


    Hope this helps ! :)

    GaryGB
     
  5. scubakobe

    scubakobe

    Joined:
    27 May 2006
    Messages:
    305
    Country:
    us-california
    Interesting! Seems he incorporated quite a bit into that program. I haven't done my research on SimConnect to know whether or not his FSX based application would work with P3D or not, maybe I can give it a try.

    My program is supporting virtual flight tests, so I will require SimConnect variables like acceleration, control surface deflection, etc... I think that one is limited in this arena.
    Thanks for the info, though, I think this will be useful for many!

    My git repo can be accessed here: https://github.com/scubakobe/P3Duino

    Kobbe
     
  6. Carlos Rodrigues

    Carlos Rodrigues

    Joined:
    10 Feb 2014
    Messages:
    3
    Country:
    portugal
    Hi scubakobe.
    Very nice work. Did you use C#?
     

Share This Page