Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    New Member
    Join Date
    Sep 2011
    Location
    UK
    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

    FSX Inputs without using keyboard emulation

    Hey Jim,

    My dad is really into his FSX and FS9 but he doesn't see the point in spending a fortune on all those fancy pre-made dials and such.

    Some things like COM, NAV and ADF frequencies are hard to set using the GUI so when I presented for his birthday last month an Arduino and various components he was intrigued.

    I have been into the Arduino side of things for ages and my dad even read my copy of the Arduino: Getting Started book so I know he was curious and as a programmer him self his understanding is good too.

    We've been building a project which makes use of your LINK2FS_FSX_inOut software, however we are finding the Link2fs_Keys aspect limiting as we would like to set the ADF but it requires a great sequence of keys be pressed in order to try to increment the numbers using a rotary encoder.

    Doing my research, SimConnect allows for a developer to set data as well as read it using events, I read on your site you wanted to make the software more generic so it could be used with other software but clearly Link2fs_FSXinOut is your main focus now and is never going to work with other games.


    Are we likely to see improvements to LINK2FS_FSX_inOut which supersede the keys behaviour with an FSX Inputs tab which actually allows the arduino to send integers and booleans up to your application and be set in simulation, and if so what time frame could we expect?

    Thanks for all your hard work, love what you've done and if I wasn't a PHP/HTML/CSS/JS/Arduino/Processing kind of person I would ask for the source code to do it myself, however I couldn't begin to know where to start.

  2. #2
    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: FSX Inputs without using keyboard emulation

    Hi and welcome to my cockpits.org

    You obviously understand code ,,, so I'll right into it.

    The ADF works fine on my setup ,, push the encoder to change which digit is active, turn the knob to change the value.
    Here's snippet from a project I have here ,,, A lot wont pertain to your PDE but you should get the gist of how to handle the ADF within the Arduino and also Link2fs_FSX_inOut.

    The ADF stuff in my PDE,,,,
    int mark; // shows where the cursor is, in the likes of ADF etc (which digit)
    int Xdif;// the difference since last loop for the rotary encoder
    int active; // the "mode" that is active. ie com1, nav2, ADF, transponder, etc.

    The actual ADF section ,,,, (don't take any notice of the garbage before "else" ,, its after "else" that it all happens.)

    if (active == 17){// ADF rotary encoder output active
    if (digitalRead(10)==0 ) {
    if (Xdif == 1) { mark = (mark - 1);active = 2; if (mark == 13) mark =12;}
    if (Xdif == -1){ mark = (mark + 1); active = 2;if (mark == 13) mark =14;}
    if (mark > 14) mark = 14;
    if (mark < 10) mark = 10;}
    else{
    if (Xdif == 1) {
    if (mark == 10) {Serial.print("R360"); }
    if (mark == 11) {Serial.print("R370"); }
    if (mark == 12) {Serial.print("R380"); }
    if (mark == 14) {Serial.print("R390"); }
    }
    if (Xdif == -1){
    if (mark == 10){Serial.print("R400"); }
    if (mark == 11){Serial.print("R410"); }
    if (mark == 12){Serial.print("R420"); }
    if (mark == 14){Serial.print("R430"); }

    }
    }
    }

    And the corresponding codes in the "keys" section on "inOut" (a grab off the INI file)
    Note: the 2 numbers wont mean anything in your case as they match the above code.
    360 - 000 - N^+A-
    370 - 000 - N^+A^+A-
    380 - 000 - N^+A^+A^+A-
    390 - 000 - N^+A^+A^+A^+A-
    400 - 000 - N^+A=
    410 - 000 - N^+A^+A=
    420 - 000 - N^+A^+A^+A=
    430 - 000 - N^+A^+A^+A^+A=
    ( Remember "Control" shows as ^ and "shift" shows as + )

    SOoooo it does work and it works fine with a rotary encoder.

    You asked about my focus ,,, My main focus is actually flying with MS flightsim ,,, I do what I have to do to create my own sim for my own enjoyment, but I share what I do so other people may benefit ,, in the end we all win because they share too.
    At the "end of the day" if some-one doesn't like what is being shared ,,, then they have the freedom to go and find something else or do it themselves.

    The only "generic" (works on other programs) software I have released is the "keys" program which is incorporated into my FSXinOut program ,,, why ? ,,, because there are such a huge number of inputs one could want and to actually do all the options would create a monster program for such a little task.
    Yes I will be incorporating some "direct" input to simconnect within my programs ,, when? ,, I wouldn't have a clue.
    My "link2fs_ Arduino_Uno1" program uses direct simconnect input.

    While I'm on about the "keys" program ,,, I haven't found anything that it cant input into FSX yet (although there is bound to be some)
    Read this ,,,, (a page on my site)
    http://www.jimspage.co.nz/fsxinputs.htm
    You will quickly realise that a fair chunk of what we want to do is covered when you have a look at the "EVENT IDs" in the SDK and start manipulating the "STANDARD.XML" in FSX.
    If you find it tiresome to type in "N^+A^+A^+A^+A-" into the "keys" menu , then you could alter the "STANDARD.XML" for decreasing the forth digit of the ADF to a single letter if you like.

    Source code ,,, No, I wouldn't share my source code at any-rate ,,, I have already supplied source code in various languages/formats to connect with simconnect and do basic functions.

    As you are familiar with java, there is a link there to a guy that made a java client to simconnect but then he closed his site. Do a goggle and all his stuff shows up in another guys site. (one day I might update my site)


    I hope I've covered everything ,,, good luck with the mission ,, Jim
    Last edited by Jim NZ; 06-04-2014 at 04:56 AM.
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  3. #3
    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: FSX Inputs without using keyboard emulation

    I suppose I should put the money where my mouth is ... Just to prove that driving the ADF with my software is effortless and smooth ,, have a look at this ,,,,

    http://www.youtube.com/watch?v=iYNgWxRpMnM

    Its using the code mentioned in that last post.
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  4. Thanks wannabeaflyer thanked for this post
  5. #4
    150+ Forum Groupie
    Join Date
    May 2006
    Location
    london england
    Posts
    195
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: FSX Inputs without using keyboard emulation

    Hi Jim is the circuit layout you used in the video the same as that shown in your links2fs documentation finally got my CNC Router built and am now back to seriously getting this arduino up and running cheers

  6. #5
    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: FSX Inputs without using keyboard emulation

    No,, it's quite different. The demo PDE with my releases is just that ,,, a demo to get it running.

    That project in the youtube flick hasn't been released yet ,, still pondering on it.
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  7. Thanks wannabeaflyer thanked for this post
  8. #6
    150+ Forum Groupie
    Join Date
    May 2006
    Location
    london england
    Posts
    195
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: FSX Inputs without using keyboard emulation

    Hi Jim just to say thanks for the feedback , i appologise as i should have read the Youtube text fully , Cheers the reason i mentioned the cct was i have all the items shown in the video and was going to try to emulate that project as it seems to be the equivelent of the saitek , Opencockpit Multiradio setups, and would fall nicely into place for me as test unit for my ever ongoing project ( Love the ardunio and need to step up gear buildwise to get things working and in place) would like to use that project as a basis to build an Autopilot module and then GPS as well .. just gonna play with the software for the 1st time now ( and will read all instructions this time LOL ) massive thanks again Jim for the hard work you have made freely available just hope we do your work justice

  9. #7
    150+ Forum Groupie
    Join Date
    May 2006
    Location
    london england
    Posts
    195
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: FSX Inputs without using keyboard emulation

    Hey Hey Jim whos a happy chappy LOL Meee .. download your link2fs ver 1 to the FSX PC and she connects up to and runs on my arduino a treat. so once again mucho gracias good buddy ( i hope thats correct translation for thanks very much mate ) big massive smile on my face last night ( tried to get Version 3 running but error message about mssing TAB32OCX etc etc ) not too worried about that at the mo cos it just means i did not read all your help files ( got them printed today so now gonna have sit down with cup o coffe and reread all docs ) upshot is Arduino works . Fsx Talks to it , i can see all the values change in link2fs so now setting up the LCD and some test switches --- wonder why i took so long cos you made using this interface card easy easy for the newbie ---Cheers Jim dont mean to be a pest but the test card & lcd are wired up and Running yeee haaa baby


    TAB32OCX error.jpgDSCN3758.jpgDSCN3755.jpg
    Last edited by wannabeaflyer; 01-09-2012 at 03:12 PM. Reason: haste mmakes waste

  10. #8
    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: FSX Inputs without using keyboard emulation

    Good stuff that you got it going ,,, yea ,, it's real easy all right. The instructions step it out nicely I think.

    Now the "Missing TAB32OCX etc etc" is due to you using " link2fs ver 1" (the fsx and fs9 one) which has no tabs on the form and in it's folder you put "Link2fs_FSX_inout_v3" (FSX only) which has tabs on the form.
    I took the tabs out to overcome this VB6 problem.

    You can still run the multiple board one by downloading Link2fs_FSX_v1e here ,,,
    http://www.mycockpit.org/forums/show...dea-s-bugs-etc
    The main program is in the first post.
    The V3 is in the same thread in post No. 31 (You already have this)
    Neither of those files are available thru my website ,,, only here at mycockpit.org.

    Knowing your skills ,, after you read all the "read-me" files you could just install the TAB ocx's etc and it should run. (I never tried that) or if you are only using FSX,, then just install both those downloads in another folder and your away !!

    Have fun ,,, I know you will ,,, Jim
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  11. Thanks wannabeaflyer thanked for this post
  12. #9
    150+ Forum Groupie
    Join Date
    May 2006
    Location
    london england
    Posts
    195
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: FSX Inputs without using keyboard emulation

    Hi Jim To my rescue again and it comes with the thanks good buddy- it seems during my downloading of all the files in your collection ( told you i was horder) i had loaded up V1 of link2fs and not the V1e version . missed that one sorry. anyways you solved my problem and now set me on the road to spending more money LOL Both version 1E and V3 now seem to fire up ok and so my next mission is to study the demo codes published and fully understand the flow and make up ( i say fully = means try to get by ), my CNC Machines are both up and running so looking forward to making panels once i flesh out the software and get to grips with encoders - not seen any encoder based PDE's here but hey that would be too easy Some homework on my part - Thanks Jim

  13. #10
    New Member
    Join Date
    Oct 2011
    Location
    Huntington Beach, CA
    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: FSX Inputs without using keyboard emulation

    Hi Jim, I hope you can help me with something simple. I am trying to control the OBS card with a GoFlight rotary module. My problem is that when I turn the knob it goes very slow. It is good for changes of one degree but when I need to turn it more that 30 degrees it takes forever. I have tried FSUIPC and Key2Mouse from WidevieW but niether seem to have what I need to set an appropriate OBS control.
    Thanks, Ed

Page 1 of 2 12 LastLast