-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change digitizer range to 12-bits, add more buttons, and add an example
- Loading branch information
Showing
3 changed files
with
47 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <USBComposite.h> | ||
|
||
USBHID HID; | ||
HIDDigitizer digitizer(HID); | ||
|
||
void setup(){ | ||
HID.begin(); | ||
while (!USBComposite); | ||
digitizer.move(0,0); | ||
delay(1000); | ||
} | ||
|
||
void loop(){ | ||
digitizer.move(2000,3000); | ||
digitizer.press(DIGITIZER_TOUCH_IN_RANGE); | ||
delay(1000); | ||
digitizer.move(4000,4000); | ||
digitizer.release(DIGITIZER_TOUCH_IN_RANGE); | ||
delay(1000); | ||
} |
9daf8f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arpruss the changes here broke it for me
12 bit is 4K max, not 16K. So either change size of coordinates in the declaration to 14 bit (preferred) or change the range to 4K.