Git Product home page Git Product logo

hid's Introduction

Arduino HID Project

Header Picture

This project went through a lot of phases and has now reached a new Arduino USB-Core Library with a lot of new functions like extended HID. It also supports HoodLoader2 (version 1 is no longer supported). The idea is to enable enhanced USB functions to almost all 'standard' Arduino boards.

Buy Me A Coffee

Supported Arduinos (IDE 1.6.7 or higher!):

  • Uno (with HoodLoader2)
  • Mega (with HoodLoader2)
  • Leonardo
  • (Pro)Micro
  • Any other 8u2/16u2/at90usb8/162/32u2/32u4 compatible board
  • Zero
  • MKR1000
  • Any other Samd21 compatible board
  • No ATSAM3 support (Due, etc)

Supported HID devices:

  • Keyboard with Leds out (8 modifiers + 6 keys pressed at the same time, + 1 limited linux consumer key)
  • Teensy Keyboard with different keyboard layouts (german, french and many more) soon
  • NKRO Keyboard with Leds out (press up to 113 keys at the same time)
  • Mouse (5 buttons, move, wheel)
  • BootKeyboard/BootMouse BIOS protocol support
  • Absolute Mouse
  • Consumer/Media Keys (4 keys for music player, web browser and more)
  • System Key (for PC standby/shutdown)
  • Gamepad (32 buttons, 4 16bit axis, 2 8bit axis, 2 D-Pads)
  • RawHID
  • SurfaceDial
  • Each device is available as single or multi report device (except RawHID)

See the wiki for more information about features etc.

Wiki

All documentation moved to the wiki page.

Contact

www.nicohood.de

If you have any questions, please ask at the Github Discussions Page.

hid's People

Contributors

blahlicus avatar facchinm avatar faxm0dem avatar gdsports avatar gitter-badger avatar hansmbakker avatar hisashikato avatar jensweimann avatar ladyada avatar marianoamado avatar matesaktesak avatar mdevaev avatar nicohood avatar per1234 avatar scyntrus avatar stolk avatar sukkopera avatar wladimir-computin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hid's Issues

Different keyboard layouts

It would be nice to have multiple keyboard layouts available. This should be as simple as putting the definition of the _asciimap variable into a separate, layout depended, header.

My knowledge about key-codes is too limited to fork this repository myself. I also think in order to make this feature actually usable, similar to teensy, there should be a menu available in the IDE - And I don't have a clue how to alter the IDE-Menu-Structure.
Simply using code from teensy is no option as the keyboard layout implementation for teensy seems to be too different from Arduino/HID.

‘class Keyboard_’ has no member named ‘writeKeycode’

when I try to compile keyboard_keycode.ino example I get the following error message:
Keyboard_Keycode.ino:36:14: error: ‘class Keyboard_’ has no member named ‘writeKeycode’

although the keyboard.h have the implementation: size_t writeKeycode(uint8_t k); and keybord.cpp
size_t Keyboard_::writeKeycode(uint8_t c) {...}

the other examples compile and run properly.
the same error occurs with arduino IDE 1:1.0.5 and 1.6.4 / 32 and 64 bits Linux mint 17.

Keyboard not recognized at boot / BIOS

The keyboard has to be a special boot keyboard with a standard descriptor. I heard it is possible with Teensy. More information can be found in the official USB docs.

http://www.usb.org/developers/hidpage/HID1_11.pdf
Seite 89 im PDF, 79 auf dem Blatt. Geht hier um Boot compatible HID devices.
Mit USB kann man ein Keyboard auf verschiedene Arten beschreiben. Standardmäßig 6 Modifier (strg, alt), 1 reserved und 6 keys. Das nutzt auch der Arduino. 

Auf seite 85/75 steht auch etwas feines. Das USB Gerät muss einen Boot Modus unterstützen, bzw sich als solches ausweisen.
Desweiteren steht hier, dass es mit dem Teensy wohl gehen sollte:
http://stackoverflow.com/questions/12682429/generic-keyboard-emulation-using-arduino-leonardo 

32u4 USB backport fixes?

Should I also adapt the magic bootloader key fix for the 32u4?
What about different PIDs to recognize the device better like HoodLoader2? This would require new drivers.

Media not work on Android

Hi. I have used the Media function with your firmware. I want MEDIA_VOLUME_UP and MEDIA_VOLUME_DOWN. Everything works goods on PC (Windows, MAC etc.). But on the Android it won't. Android see the Arduino as a Keyboard but Media functions not work.

Compiling issue after commit #2289569

After latest commit, no longer compiles the HID_Consumer test code :/

Arduino: 1.6.0 (Windows 8), Board: "Arduino Leonardo HID-Project, Serial + Extended HID"

In file included from C:\Users\Ralim\Documents\Arduino\hardware\HID\avr\cores\hid/USB-Core/HID.h:435:0,
from C:\Users\Ralim\Documents\Arduino\hardware\HID\avr\cores\hid/Arduino.h:246,
from C:\Users\Ralim\Documents\Arduino\hardware\HID\avr\cores\hid\USB-Core\USBAPI.h:53,
from C:\Users\Ralim\Documents\Arduino\hardware\HID\avr\cores\hid\USB-Core\USBCore.cpp:39:
C:\Users\Ralim\Documents\Arduino\hardware\HID\avr\cores\hid/USB-Core/System.h: In member function 'void System_::press(uint8_t)':
C:\Users\Ralim\Documents\Arduino\hardware\HID\avr\cores\hid/USB-Core/System.h:64:4: error: 'USBDevice' was not declared in this scope
USBDevice.wakeupHost();
^
Error compiling.

Also,
If i revert to the previous commit the media keys seem to no longer work?

tools.avrdude.cmd.path

Warning: platform.txt from core 'HID Project USB-Core' contains deprecated tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude, automatically converted to tools.avrdude.cmd.path={path}/bin/avrdude. Consider upgrading this core.

Compilation Error: fatal error: Platform.h: No such file or directory #include "Platform.h"

I get this error when trying to upload the Gamepad project example to my Micro:

/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/HID.cpp:140:22: fatal error: Platform.h: No such file or directory
 #include "Platform.h"
                      ^
compilation terminated.
Error compiling.

I'm using Arduino 1.5.8 Beta on OSX, and I moved the HID Library's *.h and *.cpp files to /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/ replacing the ones that were there (as per the install instructions in this projects readme.)

I've checked in /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/ but there does not appear to be a Platform.h.

I'm using the 1.8 release of the HID library.

Any ideas?

HID Consumer keys not registering under windows 8.1

Hi,
Currently the issue is windows is acknowledging (or not recieving?) the media control keys.
Using windows 8.1, by programming the HID_Consumer.ino file as a provided example to an arduino Leanardo or a Micro. The device shows up in Devices & Printers as shown, but triggering the button does not register.

Tested button functions :
Volume up
Volume down
Volume Mute
Play/Pause

rightclick

Comiling issue on Pro Mirco boards

Have a compiling error goes:

Arduino: 1.6.0 (Linux), Board: "Arduino Micro HID-Project, Default Core"

Build options changed, rebuilding all
In file included from /home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/CDC.h:51:0,
                 from /home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/Arduino.h:245,
                 from /home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBAPI.h:53,
                 from /home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.cpp:39:
<command-line>:0:10: error: 'build' was not declared in this scope
/home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.h:327:60: note: in definition of macro 'D_DEVICE'
  { 18, 1, 0x200, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
                                                            ^
/home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.cpp:101:96: note: in expansion of macro 'USB_PID'
 D_DEVICE(USB_DEVICE_CLASS_IAD, USB_DEVICE_SUB_CLASS_IAD, USB_DEVICE_PROTOCOL_IAD, 64, USB_VID, USB_PID, 0x100, IMANUFACTURER, IPRODUCT, 0, 1);
                                                                                                ^
/home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.h:327:95: error: braces around scalar initializer for type 'u16 {aka short unsigned int}'
  { 18, 1, 0x200, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
                                                                                               ^
/home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.cpp:101:1: note: in expansion of macro 'D_DEVICE'
 D_DEVICE(USB_DEVICE_CLASS_IAD, USB_DEVICE_SUB_CLASS_IAD, USB_DEVICE_PROTOCOL_IAD, 64, USB_VID, USB_PID, 0x100, IMANUFACTURER, IPRODUCT, 0, 1);
 ^
<command-line>:0:10: error: 'build' was not declared in this scope
/home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.h:327:60: note: in definition of macro 'D_DEVICE'
  { 18, 1, 0x200, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
                                                            ^
/home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.cpp:115:93: note: in expansion of macro 'USB_PID'
 D_DEVICE(USB_DEVICE_NO_CLASS, USB_DEVICE_NO_SUB_CLASS, USB_DEVICE_NO_PROTOCOL, 64, USB_VID, USB_PID, 0x100, IMANUFACTURER, IPRODUCT, 0, 1);
                                                                                             ^
/home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.h:327:95: error: braces around scalar initializer for type 'u16 {aka short unsigned int}'
  { 18, 1, 0x200, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
                                                                                               ^
/home/trevor/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.cpp:115:1: note: in expansion of macro 'D_DEVICE'
 D_DEVICE(USB_DEVICE_NO_CLASS, USB_DEVICE_NO_SUB_CLASS, USB_DEVICE_NO_PROTOCOL, 64, USB_VID, USB_PID, 0x100, IMANUFACTURER, IPRODUCT, 0, 1);
 ^
Error compiling.

Selected board depends on 'HID' core (not installed)

Hi Sir,
I use your [Arduino HID Project 2.1] on the Leonardo board.
But I can not upload the program.
It always alert "Selected board depends on 'HID' core (not installed)"

Please see the picture. Thank you very much

pic

Possible errors in the description of the installation

Hi,
I'm running ARDUINO 1.6.0rc2 on W7 pro SP1

In the description it says, "At the moment You have to move the cores/HID folder intoyour Arduino installation arduino-1.6.0/hardware/Arduino/AVR/cores/HID Because of a bug in the IDE."

First i renamed the original folder "\Arduino\hardware\arduino\avr\cores\arduino" then created a new folder : "\Arduino\hardware\arduino\avr\cores\arduino" then move the contents of "cores/hid" to: "\Arduino\hardware\arduino\avr\cores\arduino" to compile a blank sketch.

after change

/BG

HID descriptor limited to 255 bytes

In USBCore.h

define D_HIDREPORT(_descriptorLength) \

{ 9, 0x21, 0x1, 0x1, 0, 1, 0x22, _descriptorLength, 0 }

should be

define D_HIDREPORT(_descriptorLength) \

{ 9, 0x21, 0x1, 0x1, 0, 1, 0x22, _descriptorLength, _descriptorLength>>8 }

USB wake up not working

I am trying to wake up my PC using my arduino leonardo, but currently I can open the power management as a keyboard in my device manager. I also have enabled to to wake my computer but now I still cannot wake my computer when I transmit data to my computer through arduino. Can i know why. I am kinda newbie to arduino. Thank you.

Board manager with IDE 1.6.4 warnings

The board manager return me some warnings !
Warning: platform.txt from core 'HID Project USB-Core' contains deprecated tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude, automatically converted to tools.avrdude.cmd.path={path}/bin/avrdude. Consider upgrading this core.
Warning: platform.txt from core 'HID Project USB-Core' contains deprecated tools.avrdude.config.path={runtime.ide.path}/hardware/tools/avr/etc/avrdude.conf, automatically converted to tools.avrdude.config.path={path}/etc/avrdude.conf. Consider upgrading this core.
Warning: platform.txt from core 'HID Project USB-Core' misses property tools.avrdude.path, automatically set to {runtime.tools.avrdude.path}. Consider upgrading this core.

Add support for Pololu A-Star 32u4

I'm trying to add support for the Pololu A-Star 32u4 that I'm using. I assume it should be equivalent to the Leonardo.

I've copied the data from the boards.txt that came with the A-Star 32u4, and tried to integrate it into the HID boards.txt, by copying missing stuff from the Leonardo entry. I ended up with:

aStar32U4.name=Pololu A-Star 32U4
aStar32U4.vid=0x1ffb
aStar32U4.pid=0x2300
aStar32U4.vid.1=0x1ffb
aStar32U4.pid.1=0xa300
aStar32U4.upload.protocol=avr109
aStar32U4.upload.maximum_size=28672
aStar32U4.upload.speed=57600
aStar32U4.upload.disable_flushing=true
aStar32U4.bootloader.low_fuses=0xff
aStar32U4.bootloader.high_fuses=0xd0
aStar32U4.bootloader.extended_fuses=0xc8
aStar32U4.bootloader.path=caterina
aStar32U4.bootloader.file=Caterina-A-Star.hex
aStar32U4.bootloader.unlock_bits=0x3F
aStar32U4.bootloader.lock_bits=0x2F

aStar32U4.build.mcu=atmega32u4
aStar32U4.build.f_cpu=16000000L
aStar32U4.build.core=HID:hid
aStar32U4.build.vid=0x1ffb
aStar32U4.build.pid=0x2300
aStar32U4.build.usb_product="Pololu A-Star 32u4"
aStar32U4.build.board=AVR_LEONARDO
#aStar32U4.build.variant=arduino:leonardo
aStar32u4.build.extra_flags={build.usb_flags}

#USB core selection
#HID Project needs to be installed https://github.com/NicoHood/HID
aStar32U4.menu.usbcore.hid=Serial + Extended HID
aStar32U4.menu.usbcore.hid.build.variant=leonardo_hid
aStar32U4.menu.usbcore.gamepad=Serial + Gamepad HID
aStar32U4.menu.usbcore.gamepad.build.variant=leonardo_gamepad
aStar32U4.menu.usbcore.custom=Serial + Custom HID
aStar32U4.menu.usbcore.custom.build.variant=leonardo_custom
aStar32U4.menu.usbcore.USB_CORE=Default Core
aStar32U4.menu.usbcore.USB_CORE.build.variant=leonardo
aStar32U4.menu.usbcore.NO_USB=No USB functions
aStar32U4.menu.usbcore.NO_USB.build.variant=leonardo_no_usb

When I try to build in the Arduino environment, I get the errors starting with:

In file included from /Users/erlandlewin/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/CDC.h:51:0,
                 from /Users/erlandlewin/Documents/Arduino/hardware/HID/avr/cores/hid/Arduino.h:245,
                 from /Users/erlandlewin/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBAPI.h:53,
                 from /Users/erlandlewin/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.cpp:39:
/Users/erlandlewin/Documents/Arduino/hardware/HID/avr/cores/hid/USB-Core/USBCore.cpp:101:87: error: 'USB_VID' was not declared in this scope
 D_DEVICE(USB_DEVICE_CLASS_IAD, USB_DEVICE_SUB_CLASS_IAD, USB_DEVICE_PROTOCOL_IAD, 64, USB_VID, USB_PID, 0x100, IMANUFACTURER, IPRODUCT, 0, 1);

I'm not sure how to continue from here. Can you help me? Thanks!

"#error HID Project can only be used with an USB MCU."

Whenever I try to compile anything with the library, I get this error:
In file included from /home/bobby/Arduino/libraries/HID-dev_2_4/examples/BootKeyboard/BootKeyboard.ino:14:0:
/home/bobby/Arduino/libraries/HID-dev_2_4/src/HID-Project.h:37:2: error: #error HID Project can only be used with an USB MCU.
#error HID Project can only be used with an USB MCU.
^
exit status 1
Error compiling.

The sketches I'm trying to use are the example sketches, so it's not an issue with my code. My HID Project version is 2.4 as of c78fc92. My Arduino version is 1.6.6 2015/10/27 05:26. I have HoodLoader installed, and I'm just trying to verify, not upload.

PID and VID Configuration

(Sorry for my english, i'm student brazilian)
"My engeneering project: Arduino working like "HP Printer" and filtering data."
Hi, how to configure vid and pid of the MEGA16u2?
I've set HoodLoader2 and HDI project and both works ok,
I picked the "pid and vid" of Photosmart c4600 series (http://hplipopensource.com/hplip-web/models/photosmart/photosmart_c4600_series.html) and wanted to copy for my arduino.

Could me help to setup pid and vid of MEGA16u2?
(USB VID:PID 1008:29713)

Thanks!

Keyboard.release compilation error

I have a program that I was using with the standard Arduino USB Keyboard library.

I just installed the latest NicoHood HID library.

I'm getting:

pinballController2.cpp.o: In function `loop': 
/Users/xyzzy/Downloads/PinballController2.ino:78: undefined reference to `Keyboard_::release(unsigned char)'
/Users/xyzzy/Downloads/PinballController2.ino:105: undefined reference to `Keyboard_::release(unsigned char)'
collect2: error: ld returned 1 exit status

I have not had time to troubleshoot this myself yet.

dev_2_4 break press/releaseAll at #1a676a2

Hi Nico,

I just synchronized my local fork from dev_2_4 fbbf4f0 to dev_2_4 1a676a2 and noticed that the Keyboard.press/Keyboard.releaseAll() no longer works.

I used these to simulate "ENTER" e.g:

 Keyboard.press(0xB0);    //0xB0 : KEY_RETURN
 Keyboard.releaseAll();

Note that:

 Keyboard.print("yeah");

Still works as expected.

Thanks!

Compilation termined

Hi!

I've downloaded the dev 2-4 branch and I'm trying to test the library to make a keypad under arduino 1.6.6 (hourly build of today) and when trying to compile it says:

In file included from /home/luis-diaz/arduino-nightly/libraries/HID/src/HID-Project.h:41:0,
from /home/luis-diaz/arduino-nightly/libraries/HID/examples/Consumer/Consumer.ino:12:
/home/luis-diaz/arduino-nightly/libraries/HID/src/MultiReport/AbsoluteMouse.h:29:17: fatal error: HID.h: No such file or directory
#include "HID.h"
^
compilation terminated.
exit status 1
Error compiling.

I don't know what to do to fix this error. Would you help me?

Thanks!

Add Raw HID / Generic HID

Implemented, but doesnt work. The reason is because it doesnt like the multireport. You have to remove the report ID and send the usb data without report ID in the HID_SendReport()

Add Joystick profile

I don't understand very well what is the difference between a gamepad and a joystick .
I have tried to add a Joystick profile to your 2.2 code but not certain (can't test actually) that it run well .
But i can compile the code ...

Hid.h

ifndef HID_REPORT_JOYSTICK

define HID_REPORT_JOYSTICK(report_id) /* 32 buttons and a throttle - just in case the game doesn't recognise a joystick with no analog axis */ \

0x05, 0x01,                         /* USAGE_PAGE (Generic Desktop) */ \
0x09, 0x04,                         /* USAGE (Joystick) */ \
0xa1, 0x01,                         /* COLLECTION (Application) */ \
0x85, report_id,                    /*      REPORT_ID */ \
/* 32 Buttons */ \
0x05, 0x09,                         /*      USAGE_PAGE (Button) */ \
0x19, 0x01,                         /*      USAGE_MINIMUM (Button 1) */ \
0x29, 0x20,                         /*      USAGE_MAXIMUM (Button 32) */ \
0x15, 0x00,                         /*      LOGICAL_MINIMUM (0) */ \
0x25, 0x01,                         /*      LOGICAL_MAXIMUM (1) */ \
0x75, 0x01,                         /*      REPORT_SIZE (1) */ \
0x95, 0x20,                         /*      REPORT_COUNT (32) */ \
0x55, 0x00,                         /*      UNIT_EXPONENT (0) */ \
0x65, 0x00,                         /*      UNIT (None) */ \
0x81, 0x02,                         /*      INPUT (Data,Var,Abs) */ \
/* 8 bit Throttle and Steering */ \
0x05, 0x02,                         /*      USAGE_PAGE (Simulation Controls) */ \
0x15, 0x00,                         /*      LOGICAL_MINIMUM (0) */ \
0x26, 0xff, 0x00,                   /*      LOGICAL_MAXIMUM (255) */ \
0xA1, 0x00,                         /*      COLLECTION (Physical) */ \
0x09, 0xBB,                         /*          USAGE (Throttle) */ \
0x09, 0xBA,                         /*          USAGE (Steering) */ \
0x75, 0x08,                         /*          REPORT_SIZE (8) */ \
0x95, 0x02,                         /*          REPORT_COUNT (2) */ \
0x81, 0x02,                         /*          INPUT (Data,Var,Abs) */ \
0xc0,                               /*      END_COLLECTION */ \
/*   Two Hat switches */ \
0x05, 0x01,                         /*      USAGE_PAGE (Generic Desktop) */ \
0x09, 0x39,                         /*      USAGE (Hat switch) */ \
0x15, 0x00,                         /*      LOGICAL_MINIMUM (0) */ \
0x25, 0x07,                         /*      LOGICAL_MAXIMUM (7) */ \
0x35, 0x00,                         /*      PHYSICAL_MINIMUM (0) */ \
0x46, 0x3B, 0x01,                   /*      PHYSICAL_MAXIMUM (315) */ \
0x65, 0x14,                         /*      UNIT (Eng Rot:Angular Pos) */ \
0x75, 0x04,                         /*      REPORT_SIZE (4) */ \
0x95, 0x01,                         /*      REPORT_COUNT (1) */ \
0x81, 0x02,                         /*      INPUT (Data,Var,Abs) */ \
0x09, 0x39,                         /*      USAGE (Hat switch) */ \
0x15, 0x00,                         /*      LOGICAL_MINIMUM (0) */ \
0x25, 0x07,                         /*      LOGICAL_MAXIMUM (7) */ \
0x35, 0x00,                         /*      PHYSICAL_MINIMUM (0) */ \
0x46, 0x3B, 0x01,                   /*      PHYSICAL_MAXIMUM (315) */ \
0x65, 0x14,                         /*      UNIT (Eng Rot:Angular Pos) */ \
0x75, 0x04,                         /*      REPORT_SIZE (4) */ \
0x95, 0x01,                         /*      REPORT_COUNT (1) */ \
0x81, 0x02,                         /*      INPUT (Data,Var,Abs) */ \
0x15, 0x00,                         /*      LOGICAL_MINIMUM (0) */ \
0x26, 0xff, 0x00,                   /*      LOGICAL_MAXIMUM (255) */ \
0x75, 0x08,                         /*      REPORT_SIZE (8) */ \
0x09, 0x01,                         /*      USAGE (Pointer) */ \
0xA1, 0x00,                         /*      COLLECTION (Physical) */ \
0x09, 0x30,                         /*          USAGE (x) */ \
0x09, 0x31,                         /*          USAGE (y) */ \
0x09, 0x32,                         /*          USAGE (z) */ \
0x09, 0x33,                         /*          USAGE (rx) */ \
0x09, 0x34,                         /*          USAGE (ry) */ \
0x09, 0x35,                         /*          USAGE (rz) */ \
0x95, 0x06,                         /*          REPORT_COUNT (2) */ \
0x81, 0x02,                         /*          INPUT (Data,Var,Abs) */ \
0xc0,                               /*      END_COLLECTION */ \
0xc0                                /*   END_COLLECTION */

endif

Add MIDI on 32u4?

I see that this is already on your todo list. How hard would this be? What would be required?

Support for rumble/force feedback

Clarification of #52

There seems to be a missing feature in the Gamepad class. I would like to be able to handle feedback from the host controller/program, for example the rumble or force feedback feature that is implemented by some gamepads. I believe some code related to host feedback is in place (such as keyboard LEDs) that just has to be expanded upon to include this feature.

HID needs to wait until initialized

We need something similar to while(!Serial) just for HID. In this example StartupHID never appears. You need to add a 1-2s delay first.

#include "HID-Project.h"

void setup() {
  while(!HID);
  Keyboard.begin();
  Keyboard.println("StartupHID"); 

  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}

Gamepad control signals from host

My robotics group and I are making a custom driver's console that has a 4x4 button matrix with RGB LEDs per button. I'm working on implementing an Arduino to act as a game controller, with HID/HoodLoader2 as the backend. I'm looking for a way to read signals from our robot to run the LEDs: our robot library has a setOutput(int, boolean) that allows us to send the signals, but I can't find a way to receive them.

1.6.6 compile issue

arduino/Arduino#3649

All libs need to have a separate folder. This means you also need to add X libraries to the boards manager. No idea how to solve this yet, I want to keep it as single project, not with X different libs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.