Skip to content

gargrag/xplane_bae146_mcu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-Plane BAe 146 Arduino Interface

A bidirectional bridge between X-Plane flight simulator and Arduino hardware for building a physical cockpit panel for the BAe 146 aircraft.

Features

  • X-Plane to Arduino: Syncs simulator datarefs to physical displays and LEDs
  • Arduino to X-Plane: Sends physical switch/button inputs back to the simulator
  • Real-time WebSocket communication with X-Plane's API
  • Support for momentary buttons, toggle switches, and rotary encoders
  • 7-segment LED displays for frequencies, course, and altitude
  • Status LEDs for autopilot modes

Hardware

  • Arduino (Mega recommended for pin count)
  • MAX7219 LED display drivers (for 7-segment displays)
  • Momentary push buttons
  • Toggle switches
  • Rotary encoders
  • LEDs for status indicators

Dependencies

Python

pip install websockets requests pyserial

Arduino

Usage

  1. Start X-Plane with the web server enabled (default port 8086)
  2. Connect your Arduino
  3. Run the Python bridge:
python xplane.py

The script will auto-detect the Arduino and connect to X-Plane.

Configuration

Edit xplane.py to customize switch and dataref mappings:

# Momentary buttons
bridge.add_momentary_switch("nav_swap", "sim/radios/nav1_standy_flip")

# Toggle switches
bridge.add_toggle_switch_dataref("fd_bars", "thranda/autopilot/FD_Show_Pilot")

# Rotary encoders
bridge.add_rotary_encoder_commands("nav1_encoder", "thranda/knob/RheostatUp09", "thranda/knob/RheostatDn09")

# LED indicators
bridge.add_boolean_dataref("sim/cockpit2/autopilot/heading_mode", "hdg")

Project Structure

.
├── xplane.py                 # Python bridge application
└── arduino/
    └── bae146/
        └── bae146.ino        # Arduino firmware

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors