Git Product home page Git Product logo

msfs2020-ardunio-controller's Introduction

Microsoft Flight Sim Arduino Radio Controller

A simple arduino based controller for Microsoft Flight Simulator 2020 (MSFS) to control the COM1 radio frequencies.

There are two parts to the project:

  • Arduino controller project
  • Windows based connector app

Arduino controller project

For this you will need:

  • Arduino controller e.g. Arduino Leonardo
  • I2C LCD screen
  • Rotary encoder
  • Button x2
  • Breadboard
  • Various wires

ArduinoProject

Windows connector app

This project includes the code needed to run a small app that takes commands from the arduino controller and communicates with MSFS 2020. It communicates with the Arduino over a COM port and communicates with MSFS using the SimConnect API that Microsoft provides.

Getting started

Building the arduino controller

If you have done some arduino things before you can get started by wiring up 2 buttons to input pins + ground, connecting your I2C LCD to the SCL/SDA pins + 5V and ground and the rotary encoders 3 (or 5 if it has a button) pins to digital pins.

If you haven't done this before. I am hoping to record a video soon with step by step instructions :)

Deploying the arduino code

You will need to have your Arduino all set up and ready to go with the Arduino IDE.

The arduino sketch you need to load is in the arduino controller folder.

In ArdunioController.ino You will need to update the following defines to the pins that you connected your buttons and encoder to:

#define ROTARY_PIN1	9           // DT pin on rotary encoder
#define ROTARY_PIN2	10          // CLK pin on rotary encoder
#define BUTTON_PIN	7           // SW pin on rotary encoder
#define CLICKS_PER_STEP   4     // number of steps for each "notch" on your rotary encoder 
#define XFER_BUTTON_PIN  12     // button A pin - transfer from standby to active frequency
#define MINOR_BUTTON_PIN  11    // button B pin - switch between tuning the whole part of the freq e.g. 123 and the fractional part e.g. .750

Building and starting the Windows app

You will need Visual Studio to build and run the app. When your run it, it should detect the COM ports you have things connected to and you should see your arduino like this.

WindowsController

Putting it all together

After you have deployed the arduino project and built the windows application you are ready to start using it!

  • Start MSFS and wait for it to load
  • Power up your Arduino
  • Start the windows app
  • Select the correct COM port the arduino is on
  • Click Connect to connect to MSFS and the arduino

If everything goes well you should be able to:

  • Click button A to switch the standby and active frequencies for COM1
  • Dial the rotary encoder to change the standby frequency
  • Click button B to flip between changing the major part or the minor part of the standby frequency

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.