Arduino based game controller adapter for regular RC receivers up to 6 channels.
It acts as an USB joystick, dispatching the channel-values read from a PWM receiver. Aimed to be fast and responsible, though simple to use with automatic calibration function. It can be useful to play simulators wireless from the computer/tablet with your favourite transmitter. Compatible with Windows, Mac, Linux, Android,IOS.
- Sparkfun Pro Micro (5v/16Mhz)
- 6 CH RC receiver (PWM, 5v)]
- Tactile SPST switch (momentary pushbutton)
- some jumper wires (female-female)
The code is mostly written for Sparkfun Pro Micro, since it is based on ATmega 32U4 and can act as a game controller on USB. Though it may compile fine on other boards also (eg. Leonardo). Some jumperwires are needed to connect the receiver to the Pro Micro. Below on the picture you can see an example of wiring and setup in details.
To upload this particular piece of code on the Pro Micro you're going to need Arduino IDE 1.8.2 at least.
The Pro Micro boards usually have 2 leds side-by-side, which are the TX and RX status lights. These are used to reflect the state of the adapter:
On every startup these are flashing twice, then one of them is going off, the other one stays on. This means booted up successfully and ready to play.
But if they stay on, that means the adapter is in calibration mode. The calibration data is loaded and verified during setup,
but if these are incorrect/missing than it goes to calibration mode automatically.
Calibration process is the same as everywhere, the sticks, pots, switches on all channels must moved to their extents. Preferably more than once and in slow motion.
The leds are lit
During calibration there is no sending of joystick values to the host, there is no feedback at all, except it is in '#DEBUG_ENABLED' mode. Though in debug mode it's only using terminal to send data, there is no hid interface. While in normal operation after the calibration data is accepted and saved it goes directly to play mode.
Sometimes it is needed to re-calibrate the adapter, although there is valid calibration data saved. To achieve that just plug in the usb while pushing the attached button. Then everything should be the same as with automatic process.
Only known restriction is the calibration autosave function accepts only if there is 6 working channels calibrated. In case you connect less channels then you always need to push the button to save calibration data.