There is small board with gyroscope. Controller - Atmega 8a, com-usb chip is CH340G. Board is handmade but not by me so I don't sure is it Arduino clone or not. It works with "ch341ser" driver on the computer and is used in small video game writed on java. This game is ran by .bat file where I specify COM port number, game listen this port in code.

I need to do anything to make computer understand gyro tilt as arrow keyboard buttons commands. In other words I need to write a driver or smth else to make computer understand device as USB HID keyboard. Is it possible to do it programmatically and how to do that?

  • You could try using V-USB, instead of using the CH340G that only does serial.
    – Gerben
    Feb 19 '17 at 15:28
  • 1
    It will be a lot easier to buy a Arduino Micro or Pro Micro with a ATmega32U4. That chip can be set as a keyboard with standard Arduino libraries.
    – Jot
    Feb 19 '17 at 17:41

No, it's not possible. The device enumerates as a USB serial device, and the only way to change that is to change the internal silicon of the device.

The closest you could do is (though I have no clue how on Windows) write (or if you are lucky, find) a program that reads serial data through the COM port and somehow injects keyboard commands into the input subsystem of the operating system.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.