I Suck At Documenting

May 30, 2014

Catch Up

Good golly, it’s been almost a year since my last post.  I blame apathy. Last November I built a Radio Stack for Flight Simulator X (FSX).  It uses an Arduino Leonardo clone, and third party software called “Link2FS_Multi”.

I didn’t have to use a clone, its just what I had on hand.

Other parts used:
4 MAX7219 display modules to drive the 7 segment displays
1 Elma E37 Dual Concentric Rotary Encoder with push button
2 Momentary Push Switches
1 Toggle Switch
1 Rotary Switch

FSX Radio Stack
FSX Radio Stack

After the Radio Stack, I got cocky and started work on a 737 style MCP/autopilot.
It uses the same type of interface, Link2FS_Multi to talk to FSX, but this time I used an Arduino Mega.
As of this writing the MCP is still under construction, but is partially functional.
I plan to program it to work with the PMDG 737NGX.  Not a walk in the park, as PMDG uses proprietary offsets with their aircraft. Fortunately they publish the offsets.

FSX 737 MCP Autopilot
FSX 737 MCP Autopilot

 

I NEED TO…

I need to document these projects with more photos and detailed explanation.

 

32 thoughts on “I Suck At Documenting

  1. Hi,
    Congratulations for the project, and most of all thanks for taking your time to document it and taking good pictures. It really made up for an interesting reading. BTW It’s not true that you suck at documenting!
    Keep up with your goob job!
    As a footnote, please have a more thorough look at your anti-spam filters; two unrelated IP addresses I used (home and work) were blocked for alleged spamming (which I absolutely assure you I never sent, let alone the company I work for). It’s not that pleasant to be called a piece of sh*t for no reason.

    1. GiorgioCC,
      Congratulations! You appear to be my first legitimate commenter.
      The reason that you probably got kicked out was that I had “*.it”, (basically Italy) set to be rejected.
      I was getting a lot of spam from that Top Level Domain. I have since rescinded the restriction.
      Nothing personal was meant in my rejection message, provided you are not a spammer.
      But it’s also good to know that it works, thanks for testing 🙂
      I added the clarifier “likely” to my rejection message.
      So, anyone else that gets it will see:
      “Because you are likely a piece… …spammer.”

      ~Fess

  2. Great work,
    I have been looking at yr work for some time but can’t figure out how to do the connector to the arduino board. Can you send me some instructions on how to connect the modules to the board?

    Tvmetric

  3. Hi, nice job. I am starting a MCP for 737 PMDG using Arduino and Link2fs, however, I dont know how to read more offsets of PMDG MCP and send it to Arduino by link2fs. How do you doing it?

    Cunha.

  4. Seeing that i am a newbie, can you send me the codes you use for 737 autopilot panel? I am still toggling with the connections.

    TV

    1. Unfortunately, I have been side tracked all summer, and have not had time or gumption to work on the MCP coding.
      It all depends on what you want to do. A basic FSX autopilot is not too difficult to code, but that won’t work with the PMDG 737. I am intending to make this work with the PMDG 737, which requires knowing the “offsets” that the PMDG plane uses. Coding for the PMDG MCP is not like coding for a Radio Stack, or a basic Auto Pilot. Link2FS has function codes built in to make FSX stock cockpit variables easy to change. You send the code to advance the COMM1 Mhz up one, and it goes up one. With the PMDG MCP, there are no “up one”, “down one” codes in Link2FS.
      If you want to change the HDG on the MCP you have to send the whole HDG to FSX for each tick, this can lag the displays depending on how you have it coded.

      On my Radio Stack, I have Link2FS send the Frequencies that are displayed in FSX, to the Arduino, which then puts them on the 7 segment displays. When you turn the knob to change a Frequency, the Arduino sends the signal to move the Freq up or down one to Link2FS. Link2FS tells FSX to move the Freq up or down. When the Freq changes in FSX, Link2FS sees it and sends the info back to the Arduino to be displayed. This allows changes inside the sim on the virtual radio or outside the sim on the hardware radio to stay in sync.

      With the PMDG MCP, I think it will have to be coded to treat the Hardware MCP as a Master to cut out display lag. So instead of the sim dictating to the displays, we will have the hardware display dictate to the sim.

      ~Fess

  5. Hi Fess,

    Thank you, but i have already created an autopilot panel and it worked great but i am now adding the Max7219 display modules. Its my first time working with arduino, i just want to know how to connect the displays to arduino?

    TV

  6. Dear Sir

    I would like you to help me regard the Arduino code for small MCP.
    I use Arduino Uno communicated with Link2FS. I use 7 segment with MX7219 for 8 digit 7 segment. I try to write a code for get the real number for ALT as the same time with simulation. But I can not do that. I just want a code for small program for get the data from FSX and Link2 FS to show on 7 Segment.
    Would you please help. I appreciated you so much for help.

    Best regards

    Chamnan H.

    1. Chamnan
      I am working on a post that will hopefully answer your questions.
      With any luck it will be up later today.

      ~Fess

  7. Hi Fess,

    Thank you very much for your time and information, this proves very helpful to me and others in need.

    I will try these and let you know the results.

    TV

  8. Hi,

    I am presently on vacation from work and decided to try the codes again but when i click verify I keep getting the below error messages:

    For this line”

    LedControl led_Display_1 = LedControl(12,10,11,8); // together running off of pins 12,11,10.

    Error messages:

    sketch_dec18b.ino:43:38: error: LedControl.h: No such file or directory
    sketch_dec18b:46: error: ‘LedControl’ does not name a type
    sketch_dec18b.ino: In function ‘void setup()’:
    sketch_dec18b:73: error: ‘led_Display_1’ was not declared in this scope
    sketch_dec18b.ino: In function ‘void EQUALS()’:
    sketch_dec18b:153: error: ‘led_Display_1’ was not declared in this scope

    How do I fix these?

  9. Hi Fess,
    I am trying to complete my 737 autopilot panel displays.
    I not sure where i go wrong but i uploaded the LedControl library and copies your codes. I run fsx and clicked the check boxes in Lind2fs but the displays only come on and them after a few seconds goes off. I cannot get the displays to show the corresponding indicated information such as alt, speed, course, heading etc.

    Do you have the completed codes for your 737 autopilot panel?

  10. Hi Fess,
    Thank you very much for your assistance. All the AP panel displays worked fine for me, it looks great. Now I am looking forward to program the encoders and switches.

    TV

    1. Tvmetric,
      Good to hear.
      I have been bogged down and haven’t finished the code for my MCP. I disassembled most of the MCP in order to solder the display contacts to the tether wires. I’m also in the process of trying to get my computer space and tinker space organized. After that, hopefully I can resume work to complete the MCP.

      ~Fess

  11. Thank you Fess,
    I got the displays to work separately and the rotary encoders to work separately in two separate uploads to the arduino. What i want is both the rotary encoders and the displays to work together in one upload. When i upload the merged codes only the Rotary encoders work but not the displays.
    Can i get you email address so i can send you the codes i used and photos of my setup?
    TV

  12. Ok Fess i got both the displays and rotary encoders to work together.
    I going to concentrate on the switches and push buttons.
    Going good so far, thanks to you and Jim.

    TV

  13. I really like the buttons you chose to use on the MCP. What are they called and where can i locate some just like it?

    1. The Buttons made by a Japanese company called “Miyama” or “Three Mountain” or “Mountain”. The part number is DS-661.
      I purchased mine at
      http://www.opencockpits.com/catalog/pushbutton-with-p-118.html?cPath=24_55 for 2.20 Euros.
      The opencockpit.com store is located in Spain. If you purchase there, and you are from the US, I recommend using paypal. My credit cards wouldn’t fly there. The shipping isn’t cheap either.
      Before writing this I scoured the web again. Mouser Electronics mouser.com used to carry them but are now listed as “Obsolete” on their site.
      Mouser’s data sheet with Mousers Stock Numbers is here.
      http://www.mouser.com/ds/2/221/MS-100226-195057.pdf.
      Mountain made these switches in a few flavors with red, green and yellow LEDs.
      I found some on AliExpress with red LEDs. The least expensive were here.
      http://www.aliexpress.com/item/Original-Japan-three-mountain-DS-661-touch-switch-with-red-button-switch-key-switch-normally-open/1540790411.html.
      I found the Green LED ones at one other location, at Setron a German site.
      https://ec.setron.de/products/028556-.aspx
      I do not know if they will ship to the US, but their price is the lowest I have found.

      ~Fess

  14. hi fess
    i have your code for the radio . i have change it a lot to for my radio. i have 8 digits 7 segment for the radio that i use only com1/nav1/adf to display on the 2 combined display. i can switch from com1 to nav 1 and from standby to active. the encoder work very well to change the freq on the standby for all 3 .the only thing i cant get to work is my adf. my adf shows the freq on the display like com1 and nav1. but seems that the fsx radio adf switch standby to active i cant get the encoder just to change the active one. your help is much appreciated. i cant find it in your code that you can change only the active adf freq. regards andre

    1. Andre,
      I did not code a standby for the ADF.
      Link2FS Extractions only have the ADF1 Frequency, no Standby.

      ~Fess

  15. hi fess,
    thanks for replying back. after i build my radio and used the fsx default radio that have the stdby adf i thought it did not work. when i selected my wilco radio
    the adf work perfectly without the stdby it change the active freq on the adf.
    regards
    andre

  16. Hi Fess,

    Very nice job !
    I’m looking for a script to control a 7_segment display for a radio panel. It’s possible to get your’s ?
    Thanks
    Vincent

    1. Vincent,
      There is some sample code for the Max7219 7 segment display modules on one of my posts on this site.

      ~Fess

Leave a Reply to Tvmetric Cancel reply

Your email address will not be published. Required fields are marked *