Open abp250 opened 8 years ago
I also do not have much C++ experience but I did notice a small difference. Below shows the addition of the HID_PROTOCOL_JOYSTCK parameter. I hope this helps.
hid.h:#define HID_PROTOCOL_NONE 0x00
hid.h:#define HID_PROTOCOL_KEYBOARD 0x01
hid.h:#define HID_PROTOCOL_MOUSE 0x02
**hid.h:#define HID_PROTOCOL_JOYSTICK 0x03**
**JoystickController.h: HIDBoot<HID_PROTOCOL_JOYSTICK> hostJoystick;**
KeyboardController.h: HIDBoot<HID_PROTOCOL_KEYBOARD> hostKeyboard;
MouseController.h: HIDBoot<HID_PROTOCOL_MOUSE> hostMouse;
bbx10,
Thank you, but I do have that in the code already. I forgot to include it in the additions of code in the lib. I added that in the post. Thank you.
Hello,
I am trying to use this library to intervace with my Logitech extreme 3D pro joystick controller so I made a few additions to the source code. I basically followed the same format that the Mouse and Keyboard use but adapted it to be used for the joystick device.
JoystickController.cpp:
JoystickController.h:
I added this to hidboot.cpp:
and i added this to hdiboot.h:
in hid.h, added:
#define HID_PROTOCOL_JOYSTICK 0x03
And when I tried to implement this in an Arduino sketch, I got the following errors:
I searched for any differences in how the mouse and keyboard controllers were initialized and I couldn't find anything. I'm not very experienced in C++ so i need some help.
Thanks in advance,
Aaron