-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update GitHub actions - update license 2023 - move code to .cpp - update readme.md - add performance example for **read()** - minor edits
- Loading branch information
1 parent
0813fe1
commit 95e9323
Showing
10 changed files
with
153 additions
and
61 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
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
43 changes: 43 additions & 0 deletions
43
examples/analogKeypad_performance/analogKeypad_performance.ino
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,43 @@ | ||
// | ||
// FILE: analogKeypad.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: demo 4x4 analogue keypad | ||
// | ||
// https://www.tinytronics.nl/shop/nl/arduino/accessoires/robotdyn-keypad-4x4-matrix-analoog?search=matrix | ||
// | ||
|
||
|
||
#include "AnalogKeypad.h" | ||
|
||
AnalogKeypad AKP(A0); | ||
uint32_t start, stop; | ||
|
||
volatile int button; | ||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
Serial.print("ANALOGKEYPAD_LIB_VERSION:\t"); | ||
Serial.println(ANALOGKEYPAD_LIB_VERSION); | ||
|
||
Serial.println(); | ||
|
||
start = micros(); | ||
for (int i = 0; i < 1000; i++) | ||
{ | ||
button = AKP.read(); | ||
} | ||
stop = micros(); | ||
Serial.print("READ: \t"); | ||
Serial.print((stop - start) * 0.001, 2); | ||
Serial.println(" us"); | ||
|
||
Serial.println("\ndone..."); | ||
} | ||
|
||
void loop() | ||
{ | ||
} | ||
|
||
// -- END OF FILE -- |
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
Oops, something went wrong.