diff --git a/ddr-control-panel.ino b/ddr-control-panel.ino index 25452a1..1656085 100644 --- a/ddr-control-panel.ino +++ b/ddr-control-panel.ino @@ -6,14 +6,15 @@ Pins 1-6 are used for buttons, pin 7 and 8 are GRD Button to keyboard mappings Left 1 : A -Left 2 : D -Right 1 : J +Left 2 : J +Right 1 : D Right 2 : L Start 1 : S Start 2 : K */ +// Button to pin definitions #define BT_L1 1 #define BT_L2 2 #define BT_R1 3 @@ -21,6 +22,7 @@ Start 2 : K #define BT_S1 5 #define BT_S2 6 + #include void setup() @@ -57,15 +59,6 @@ void loop() } if(digitalRead(BT_L2) == LOW) - { - Keyboard.press('d'); - } - else - { - Keyboard.release('d'); - } - - if(digitalRead(BT_R1) == LOW) { Keyboard.press('j'); } @@ -74,6 +67,15 @@ void loop() Keyboard.release('j'); } + if(digitalRead(BT_R1) == LOW) + { + Keyboard.press('d'); + } + else + { + Keyboard.release('d'); + } + if(digitalRead(BT_R2) == LOW) { Keyboard.press('l');