1

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?

asked Feb 19, 2017 at 14:53
2
  • You could try using V-USB, instead of using the CH340G that only does serial. Commented Feb 19, 2017 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. Commented Feb 19, 2017 at 17:41

1 Answer 1

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.

answered Feb 19, 2017 at 15:05
1
  • @DiA I found this that may help: 232key.com Commented Feb 20, 2017 at 13:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.