Make a USB Device, Control It In Java

前端 未结 6 1941
北海茫月
北海茫月 2020-12-31 06:35

I\'m thinking about making a physical controller (device?) with knobs, buttons, and LEDs. I\'d like to interact with it using Java (respond to the knobs, light up LEDs, etc)

6条回答
  •  天涯浪人
    2020-12-31 07:32

    For some encoders and buttons, you probably want to implement a USB HID device. If you're going to produce more than a couple of them, you'll want to do a custom board. Check out V-USB, an open-source library for making USB HID devices using Atmel microcontrollers. They have a bunch of examples of projects that use this library.

    You could probably make this look like a HID joystick, using the encoders to produce X/Y axis information and having the buttons act like buttons. They you could use standard Java gaming APIs to read the joystick values.

提交回复
热议问题