File tree Expand file tree Collapse file tree 7 files changed +10
-11
lines changed Expand file tree Collapse file tree 7 files changed +10
-11
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ The library has two main classes:
1111- ** examples/Mouse** – Demonstrates receiving mouse events via a callback.
1212- ** examples/Keyboard** – Demonstrates receiving keyboard events via both callbacks and the Stream interface.
1313- ** examples/MouseAndKeyboard** – Demonstrates simultaneous support for both mouse and keyboard devices.
14- - ** examples/Barcode** - Uses tthe HID Host implementation to read 13-digit EAN codes from a USB based barcode reader.
14+ - ** examples/Barcode** - Uses the HID Host implementation to read 13-digit EAN codes from a USB based barcode reader.
1515
1616## Usage
1717
Original file line number Diff line number Diff line change 11#include < Arduino.h>
2- #include " Keyboard.h "
2+ #include < Arduino_USBHIDHost.h >
33
44USBHIDKeyboard keyboard;
55
Original file line number Diff line number Diff line change 11#include < Arduino.h>
2- #include " Keyboard.h "
2+ #include < Arduino_USBHIDHost.h >
33
44USBHIDKeyboard kb;
55
Original file line number Diff line number Diff line change 11#include < Arduino.h>
2- #include " Keyboard.h"
3- #include " Mouse.h"
2+ #include < Arduino_USBHIDHost.h>
43
54// Global device instances
65USBHIDKeyboard kb;
@@ -27,11 +26,11 @@ void onMouseEvent(const HIDMouseEvent &event) {
2726 Serial.print (" Mouse event (callback) - Buttons: " );
2827 Serial.print (event.buttons );
2928 Serial.print (" , x: " );
30- Serial.print (event.x );
29+ Serial.print (event.xMovement );
3130 Serial.print (" , y: " );
32- Serial.print (event.y );
31+ Serial.print (event.yMovement );
3332 Serial.print (" , wheel: " );
34- Serial.println (event.wheel );
33+ Serial.println (event.wheelMovement );
3534}
3635
3736void setup () {
Original file line number Diff line number Diff line change 11#include < Arduino.h>
2- #include " Mouse.h "
2+ #include < Arduino_USBHIDHost.h >
33
44// Create a global mouse instance.
55USBHIDMouse ms;
Original file line number Diff line number Diff line change 1+ #include "Mouse.h"
2+ #include "Keyboard.h"
You can’t perform that action at this time.
0 commit comments