Pergunta

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.

Foi útil?

Solução

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).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top