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 3ef1fe6 commit 2efb50eCopy full SHA for 2efb50e
libraries/USB/examples/Keyboard/KeyboardLogout/KeyboardLogout.ino
@@ -41,16 +41,18 @@ USBHIDKeyboard Keyboard;
41
// change this to match your platform:
42
int platform = OSX;
43
44
+const int buttonPin = 0; // input pin for pushbutton
45
+
46
void setup() {
47
// make pin 0 an input and turn on the pull-up resistor so it goes high unless
48
// connected to ground:
- pinMode(0, INPUT_PULLUP);
49
+ pinMode(buttonPin, INPUT_PULLUP);
50
Keyboard.begin();
51
USB.begin();
52
}
53
54
void loop() {
- while (digitalRead(0) == HIGH) {
55
+ while (digitalRead(buttonPin) == HIGH) {
56
// do nothing until pin 2 goes low
57
delay(500);
58
0 commit comments