I made a USB HID game controller using a MPU6050 module. It was inspired by Cemu Gyro Joystick project that uses a dongle to supplement motion data for CEMUhook used in emulators.
Except mine is built with a STM8S003 with VUSB library. The STM8S003 is under the programming header. T he module is surface mounted without Castellated Edges.
There were some problems with I2C errata and interference from USB traffics, but that was all resolved by adding a delay.
It is a USB low speed device and as such limited to 7 byte HID reports (1 byte by Report ID). How to send 12 bytes of data? Group the Accelerometers and Gyroscopes under separate report ID and alternating their reports. Let the PC figure them out.
Windows recognizes the new device as a game controller with 6-axis (X/Y + 4).
Let's say I don't have a clue with setting up Node.JS and figure out how to compile stuff. I have to figure out what programs to use as an alternative.
My project page: https://hw-by-design.blogspot.com/2021/05/stm8-gyrostock.html