FreeJoy-Team / FreeJoy

STM32F103 USB HID game device controller with flexible configuration
GNU General Public License v3.0
734 stars 140 forks source link

Adding UART output #208

Open relaxibus opened 1 year ago

relaxibus commented 1 year ago

Hi, I found the Freejoy project, very impressive. I would like to use it for a RC TX project, but instead of using the USB I would need a UART output to send control commands. I designed a UART protocol that reflect the USB descriptor variables such as x/y/z/xr/etc. Would it possible that you add the UART output option?

MMahyaRA commented 1 year ago

You mean you can create a gamepad using UART, which connects through a USBSerial converter, and Windows recognizes it as a game controller?

relaxibus commented 1 year ago

Not really, the idea is to use it to control RC models (planes, copters, boats and cars) without any OS in the middle. The serial output (SERaero open source protocol) will passed to an ESP32 (or any other MCU) to convert the SERaero into PP, SBUS, CRSF, ELRS, MAVLink or CAN. Here a PoC using a USB-HID to SERaero converter for any USB gaming device. This could be used, but it it would be a more reliable way to avoid the USB-HID to SERaero block and export SERaero direct out from the Freejoy board: https://www.youtube.com/watch?v=L_21r6xz2tw&t=49s

Here the SERaero protocol specs: SERaero_C2-16B_spec_v1.1.pdf

relaxibus commented 1 year ago

@MMahyaRA do you see a way to add this to Feejoy?

meghang-101 commented 6 months ago

Not really, the idea is to use it to control RC models (planes, copters, boats and cars) without any OS in the middle. The serial output (SERaero open source protocol) will passed to an ESP32 (or any other MCU) to convert the SERaero into PP, SBUS, CRSF, ELRS, MAVLink or CAN. Here a PoC using a USB-HID to SERaero converter for any USB gaming device. This could be used, but it it would be a more reliable way to avoid the USB-HID to SERaero block and export SERaero direct out from the Freejoy board: https://www.youtube.com/watch?v=L_21r6xz2tw&t=49s

Here the SERaero protocol specs: SERaero_C2-16B_spec_v1.1.pdf

You need not use FreeJoy for this application. FreeJoy is purposely made for HID interface between STM32 chips and your desktop. For your operation, you can directly create your own driver. Just put the analog data to a UART buffer and transmit it directly. Or if you want to use the SERaero, directly boot the chip with the SERaero driver. No need of a HID driver.