Created
October 23, 2014 17:17
-
-
Save pmarkun/52f9c7dc8f1c8c583e76 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* | |
| JoystickDuino | |
| */ | |
| int cima = 1; | |
| int baixo = 2; | |
| int esq = 3; | |
| int dir = 4; | |
| int soco_baixo = 5; | |
| int soco_medio = 6; | |
| int soco_alto = 7; | |
| int chute_baixo = 8; | |
| int chute_medio = 9; | |
| int chute_alto = 10; | |
| int start = 11; | |
| int select = 12; | |
| void setup() { | |
| pinMode(cima, INPUT); | |
| pinMode(baixo, INPUT); | |
| //etc | |
| } | |
| void loop() { | |
| if (analogRead(cima) == HIGH) { | |
| Keyboard.press(KEY_UP_ARROW); | |
| delay(10); | |
| } | |
| //etc | |
| //da forma como esta o codigo | |
| //fica apertando infinitamente o botao | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment