문제

I'm trying to write the control code for a custom joystick, and I cannot find any reference to what needs to be implemented to be recognized by a computer as a joystick.

I can see what things I need to have by referencing various game library APIs for using a joystick.

For example, pygame has the following methods,

init
quit
get_init
get_name
get_id
get_numaxes
get_numbuttons

etc.

My next stop is to read through the kernel for Linux's HID and joystick controlers... But this seems like a really round about way of finding this information.

도움이 되었습니까?

해결책

I haven't worked with it, but it looks like there is some interesting information in Arduino Uno Joystick HID firmware and Arduino Uno Big Joystick HID firmware. There is also UnoJoy - I'd try that first (assuming you have an Arduino Uno or Leonardo).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top