D1 UNO USB (serial) as HID game controller based on mi-360

signal processing, XR, sims, microscopes, STM32, ESP32


D1 UNO USB (serial) as HID game controller based on mi-360

mi-360 fork - practice for hacking ViGEm.NET into VJoySerialFeeder

Background

Wanted: D1 UNO as HID game controller.
Unlike FTDI USB chips, CH340G on D1 UNO can only be serial.

C# code

  `DeviceWorker()` runs in a `Thread()`
    * ViGEmClient becomes `_Target`
    * Xiaomi Gamepad becomes `_Device`
    * `_Report` structure is eventually sent to `_Target` * in `DeviceWorker()`, get `hidReport` from `_Device`, then `data` from `hidReport`,     hack `data` contents into `_Report`, __finally__ `_Target.SendReport(_Report)`; * ViGEm referenced in README.md, MiGamepad.cs, mi-360-setup.iss, XInputManager.cs * HidGuardian referenced in README.md, HidGuardian.cs, mi360.csproj,
  Mi360Application.cs, mi-360-setup.iss, Drivers/

* presumably need to understand [HIDLibrary](https://www.nuget.org/packages/HidLibrary/) [GitHub](https://github.com/mikeobrien/HidLibrary)
* HID (, USB, Serial Port) [references](http://janaxelson.com/hidpage.htm)  
* .NET [SerialPort Class](https://docs.microsoft.com/en-us/dotnet/api/system.io.ports.serialport)
* stackoverflow [SerialPort HowTo](https://stackoverflow.com/questions/1243070/how-to-read-and-write-from-the-serial-port)
* [Coad's SerialPort article](https://blogs.msmvps.com/coad/2005/03/23/serialport-rs-232-serial-com-port-in-c-net/)

Automapper maps members among objects. vide0

According to Jan Axelson Microsoft supports HID devices via DirectX … but HID support is NOT found in .NET APIs

Microsoft’s MonoGame GamePad Reference strongly implies that Input for games support may be only for Xbox One and PS/4 Game Controllers and mainly via UWP.

STM32 pedals

ESP8266 pedals

WeMos D1 UNO R1 ESP8266