Big Dome Box: Difference between revisions
Jump to navigation
Jump to search
| Line 29: | Line 29: | ||
void loop() { |
void loop() { |
||
if (!flag && digitalRead(domeButton) == HIGH) { |
if (!flag && digitalRead(domeButton) == HIGH) { |
||
Keyboard.press( |
Keyboard.press(0x20); |
||
flag=true; |
flag=true; |
||
} |
} |
||
Revision as of 14:32, 5 December 2013
Matériel
- Big Dome Push Button
- MDF 6 mm / Contreplaqué 6 mm
- Arduino Leonardo
Design
Logiciel
Emergency Logout
http://www.arduino.cc/en/Tutorial/KeyboardLogout
Spacebar for Presentation
Sketch for Arduino Leornado
const int domeButton = 3;
boolean flag=false;
void setup() {
pinMode(domeButton, INPUT);
Keyboard.begin();
}
void loop() {
if (!flag && digitalRead(domeButton) == HIGH) {
Keyboard.press(0x20);
flag=true;
}
if (flag && digitalRead(domeButton) == LOW) {
Keyboard.releaseAll();
flag=false;
}
}