Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    150+ Forum Groupie verticallimit's Avatar
    Join Date
    Apr 2009
    Location
    Denmark, Sinding
    Posts
    230
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Keyboard send code

    I am building a FMC / CDU.
    Now I evaluate how I should interface CDU keyboard with Leonardo MD-80 software.
    I had an idea of coupling an old PS keyboard to an Arduino. The codes from the PS keyboard is to be modified and sent to the virtual cockpit with the numbers 1-90 see the picture.
    If I send the code "65" through SIOCServer to the virtual cockpit, it is equivalent to I press the button "A" on the FMC / CDU in the virtual cockpit.

    I do not know how I can program this with arduino.
    Are there some who have done something similar with Arduino and send data to the virtual cockpit.




    And here is an example of how to press the A with input 1 with SIOC and Open cockpit card:



    Var 0000, Value 0 // Initializing

    Var 0001, Link IOCARD_SW, Input 1, type P

    {
    IF V0001 = 0
    {
    V0002 = 0
    }
    ELSE
    {
    V0002 = 65 // Value 65 set the buttom A
    }
    }

    Var 0002, Link IOCP, Offset 2653 // set A
    Sincerely,

    Claus


  2. #2
    500+ This must be a daytime job



    Join Date
    Jan 2009
    Location
    Tampa
    Posts
    531
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Keyboard send code

    Hi Claus,

    I jus started building a CDU too. I am going to use the Open Cockpits USB keyboard module. I will look into doing it with Arduino. Are you making your own panels?


    Buddy

  3. #3
    150+ Forum Groupie verticallimit's Avatar
    Join Date
    Apr 2009
    Location
    Denmark, Sinding
    Posts
    230
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Keyboard send code

    Yes, I printed out the CDU panel in my 3D printer.
    Now i'm working on buttons an the base for switches.

    Sincerely,

    Claus


  4. #4
    500+ This must be a daytime job



    Join Date
    Jan 2009
    Location
    Tampa
    Posts
    531
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Keyboard send code

    that looks great! Too bad the CDU is so different from the A320.I am building an A320, I have a 3d printer, a laser cutter, and a CNC machine. I have already printed my throttle handles. Let me know if I can help out any.

    Buddy

  5. #5
    150+ Forum Groupie verticallimit's Avatar
    Join Date
    Apr 2009
    Location
    Denmark, Sinding
    Posts
    230
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Keyboard send code

    Thanks, Buddy.
    I love my 3D printer. Very handy for prototype, knobs and more.
    Sincerely,

    Claus


  6. #6
    500+ This must be a daytime job Jim NZ's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    764
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Keyboard send code

    Hi Claus ,, Where does that offset 2653 come from ???? I had a dig around and couldn't find any reference to it anywhere.

    Also with an ordinary keyboard can the FMC be controlled at all ??

    Sorry if they are dumb questions but I don't have a lot of add-ons and nothing like that one.

    Cheers ,, Jim
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  7. #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: Keyboard send code

    Claus,
    What you want to do can be done with an Arduino.
    But it will also require some LUA script programming and, I think, registered FSUIPC.
    I can't be much help to you as I have only started down the LUA road.
    I have had an MCP autopilot in the works off and on for over a year, and I have finally got the time to try and finish it. One of the aircraft that I want it to work with is the MilViz 737-200.
    The MilViz 737 doesn't use all stock commands and variables, and the offsets are unknown. I have used a LUA utility program called LINDA to find L-variables and have been able to manipulate them with a LUA script loaded into FSUIPC.
    One of the things I have done is pass information to an Arduino from a LUA script without Link2FS.
    I have yet to pass information from an Arduino to the LUA script, but it is possible, I just haven't had the time this week to experiment.

    The plan for my MCP is a hybrid of 2 Arduinos (master and slave), one using Link2FS for the bulk work (master), and the other communicating thru a LUA script(slave). The slave will get the annunciator variable indications and pass them to the master to light up the appropriate LEDs. Some information will have to be passed back thru the slave to manipulate some of the switches.

    My LUA skills are in their infancy.
    In the mind set of learning to crawl, walk, and run...
    What I have currently learned, is to roll over and drool on the floor.

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

  8. #8
    150+ Forum Groupie verticallimit's Avatar
    Join Date
    Apr 2009
    Location
    Denmark, Sinding
    Posts
    230
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Keyboard send code

    Hi Jim

    There are no dumb questions, only dumb answers
    In the IOCP Server there are some free offsets. Thise offsets can be interfaced with the virtual cockpit by giving them a string/name.
    See here: http://www.iocpserver.net/index.php?board=12.0

    Offset 2653 simply sends data to the viatuel cockpit FMC/CDU
    Sincerely,

    Claus


  9. #9
    150+ Forum Groupie verticallimit's Avatar
    Join Date
    Apr 2009
    Location
    Denmark, Sinding
    Posts
    230
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Keyboard send code

    Hi Fess

    That 737 looks like a great plane.

    Arduino is new to me and I roll over and drool on the floor too
    But my idea was to get a more simple solution, keyboard connected to arduino that sends key press directly to the virtual ccokpit. If this was possible this could make a "stand alone" plug and play unit.
    Maybee i will go for the Open Cockpits USB keyboard module. I belive this can be programmed to sende the data through SIOC/IOCP Server.

    Maybee you can use IOCP Server virtual cockpit interface to comunicate with your 737. You could try to contact the MilViz 737 developer he may then give you the strings/names for VC funktions.
    See link in the post abowe for IOCP Server.
    Leonardo soft was very kind to release the VC names for the Maddog.
    Sincerely,

    Claus


  10. #10
    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: Keyboard send code

    Claus,
    I dont know why I didn't think of it before, for your solution.
    Arduino Leonardo can act as a USB HID keyboard.
    If you need the pins of a Mega or more, you can hook up multiple arduinos via a number of different "Wire" methods.
    I should work if all that you want to do is have the CDU act like a keyboard.
    Point of focus may be an issue, if you have clicked in a window or gauge that uses keyboard entries.

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

Page 1 of 2 12 LastLast