Skip to content

Instantly share code, notes, and snippets.

@annem
Created January 26, 2013 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save annem/4639073 to your computer and use it in GitHub Desktop.
Save annem/4639073 to your computer and use it in GitHub Desktop.
#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