Arduino Drone Controller using input from USB HID Joystick (VKBSim Gladiator NXT EVO)
Sends X, Y, Rudder (Yaw), Throttle axis values from a USB Joystick to a RC Transmitter.
Current version requires only 1 Arduino to parse the USB HID values. An older version that sends axis values to another Arduino using nRF24L01 modules is archived inside the "nrf" folder. That version was archived due to connection issues with the nRF24L01 modules.
Using the USB Host Shield Library, the Arduino Uno parses X, Y, Rudder, Throttle values from USB Joystick HID Report into a PPM signal and sends them to a FlySky FS-i6 RC Transmitter set in "Trainer Mode".
This repo is a very slight modification of "le3dp" example from USB Host Shield Library so that it works with the VKBSim Gladiator NXT EVO Joystick.
Currently does not support button presses. If you would like to add this feature, go through the HID Report Descriptor (or you can check "HID Descriptor.txt" I uploaded; may not be accurate) and edit the "GamePadEventData" struct in "vkb.h" accordingly.
The current version of the code only utilizes files inside the "tx_vkb" folder. No need to care about other files as they are from a depracated method (those use nRF24L01 PA+LNA modules; left here for archival purposes).
- Download the folder, flash tx_vkb.ino onto an Arduino Uno.
- Setup a FlySky FS-i6 RC Transmitter such that it is in "Trainer Mode". This way the RC Transmitter accepts PPM input.
- Using a jumper cable or any other compatible cable (the PPM port on the RC Transmitter is a Mini-DIN 4 pin), connect the GND and SIG cables. (Arduino GND to RC GND, Arduino SigPin to RC top right port).
- It should work. If not, put your transmitter as "Student Mode" (PPM output) and check the signals coming out from the PPM out port (top left) using a oscilloscope. Then change the values in the CONFIGURATION part accordingly.
I referred to these websites:
https://chome.nerpa.tech/category/mcu/arduino/usb-shield/hid/
https://eleccelerator.com/tutorial-about-usb-hid-report-descriptors/
This is for a personal / school club project.