Created
January 26, 2013 00:13
-
-
Save annem/4639073 to your computer and use it in GitHub Desktop.
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
#include <Esplora.h> | |
int hammer; | |
int left; | |
void setup() { | |
Serial.begin(9600); | |
Keyboard.begin(); | |
} | |
void loop() { | |
hammer = Esplora.readButton(SWITCH_4); | |
left = Esplora.readButton(JOYSTICK_LEFT); | |
if (hammer == 0){ | |
Keyboard.press(' '); | |
delay(100); | |
} | |
else{ | |
Keyboard.release(' '); | |
delay(100); | |
} | |
delay(100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment