Ever wanted to use a FrSky Taranis wirelessly with PC simulators like FPVFreerider or RC-AirSim? This project will help you do so. The idea was to use a Teensy 2.0 USB controller and pair it with a FrSky XM receiver. The Teensy on one side will provide a USB HID gamepad to the host computer while on the other it will read the S.BUS protocol off the receiver using the Universal Asynchronous Receiver Transmitter (UART). To read the S.BUS signal an inverter in form of a simple transistor will be needed between the Teensy and the receiver. For more details please see the docs directory.
Update: If you would like to use an ExpressLRS receiver instead of the FrSky XM receiver then please check out these instructions.
- Teensy 2.0
- available here: PJRC, Teensy 2.0
- FrSky XM Receiver
- available here: FrSky, XM Receiver
- A transistor & resistor to invert the S.BUS signal for the Teensy
- available here: Reichelt, 2N7000, 10K Resistor
- AVR 8-bit gcc toolchain
- available here: Microchip, gcc toolchains
- HalfKey Loader teensy_loader_cli
- available here: PJRC, teensy_loader_cli
- Dean Camera's excellent Lightweight USB Framework for AVRs (LUFA)
- available here: Four Walled Cubicle, LUFA
- clone or download the firmware
- edit the Makefile and change the LUFA_PATH to wherever you installed LUFA
- make sure the avr-gcc and teensy_loader_cli are in your path
- execute
make
to build the hex file - press and release the tiny Teensy pushbutton to activate the HalfKey bootloader
- execute
make teensy
to download the hex file to the attached Teensy
If you don't want to build the software yourself just download the Gamepad.hex.teensy file and load it onto the Teensy using: teensy_loader_cli --mcu=atmega32u4 -w -v Gamepad.hex.teensy
Here are a few tips for adjusting the build to an Arduino Micro (original or clone). You will need avrdude to program the Micro.
- edit the Makefile and change the BOARD variable from TEENSY to MICRO
- execute
make avrdude AVRDUDE_PROGRAMMER=avr109 AVRDUDE_PORT=<serial port>
to download the hex file to the attached Micro
Replace <serial port>
with the device name the Micro is connected to on your computer after resetting. Depending on the bootloader installed on your Micro you might have to change AVRDUDE_PROGRAMMER value from avr109 to arduino. If you don't want to build the software yourself just download the Gamepad.hex.micro file and load it onto the Micro using: avrdude -p atmega32u4 -P <serial port> -c avr109 -U flash:w:Gamepad.hex.micro
Create a new model for the S.BUS gamepad on your transmitter. Make sure that you enable at least 4 channels (e.g. ailerons, elevator, throttle and rudder) for the receiver. Bind the receiver like you normally would. Use software like HTML5 Gamepad Tester to test the S.BUS gamepad. Once you have confirmed operation start your favorite simulator and enjoy.
Date: 2024-05-20