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– Gerben2017年02月19日 15:28:35 +00:00Commented Feb 19, 2017 at 15:28
-
1It 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– Jot2017年02月19日 17:41:00 +00:00Commented Feb 19, 2017 at 17:41
1 Answer 1
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.
-
@DiA I found this that may help: 232key.comMajenko– Majenko2017年02月20日 13:17:59 +00:00Commented Feb 20, 2017 at 13:17