We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c92c18 commit 07278bfCopy full SHA for 07278bf
Firmware/SimpleKeyboard_HID/SimpleKeyboard_HID.ino
@@ -0,0 +1,17 @@
1
+#include <Keyboard.h>
2
+int buttonPin = 9; // Set a button to any pin
3
+
4
+void setup()
5
+{
6
+ pinMode(buttonPin, INPUT); // Set the button as an input
7
+ digitalWrite(buttonPin, HIGH); // Pull the button high
8
+}
9
10
+void loop()
11
12
+ if (digitalRead(buttonPin) == 0) // if the button goes low
13
+ {
14
+ Keyboard.write('z'); // send a 'z' to the computer via Keyboard HID
15
+ delay(1000); // delay so there aren't a kajillion z's
16
+ }
17
0 commit comments