Loading anthonygj-buttonbox/anthonygj-buttonbox.ino +10 −8 Original line number Diff line number Diff line Loading @@ -2,12 +2,12 @@ #include <Joystick.h> #include <Keyboard.h> // Create the Joystick object Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_JOYSTICK, 32, 0, true, true, false, false, false, false, false, false, false, false, false);; false, false, false, false, false); //declare the pin number for each button, switch, encoder... //declare understandable var to recognise button in the code, const int SwitchButton1 = 2; Loading Loading @@ -153,6 +153,7 @@ void setup() { //function that will be executed again and again and again... void loop() { //call the function for each type of input switchCheck(SwitchButton1, 'a'); switchCheck(SwitchButton2, 'z'); Loading Loading @@ -181,7 +182,6 @@ void loop() { ButtonCheck(threeWay3A, 'w'); ButtonCheck(threeWay3B, 'x'); ButtonCheck(rotaryEncoder1Button, 'c'); ButtonCheck(rotaryEncoder2Button, 'v'); ButtonCheck(rotaryEncoder3Button, 'b'); Loading @@ -194,8 +194,10 @@ void loop() { rotaryEncoderChar(rotaryEncoder4A, rotaryEncoder4B , '7' , '8'); rotaryEncoderChar(rotaryEncoder5A, rotaryEncoder5B , '9' , '-'); analogJoyAxisCheck(joystickX , joystickY); ButtonCheck(joystickButton, '*'); /* analogJoyAxisCheck(joystickX , joystickY); */ } //this function manage the analog joystick Loading Loading
anthonygj-buttonbox/anthonygj-buttonbox.ino +10 −8 Original line number Diff line number Diff line Loading @@ -2,12 +2,12 @@ #include <Joystick.h> #include <Keyboard.h> // Create the Joystick object Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_JOYSTICK, 32, 0, true, true, false, false, false, false, false, false, false, false, false);; false, false, false, false, false); //declare the pin number for each button, switch, encoder... //declare understandable var to recognise button in the code, const int SwitchButton1 = 2; Loading Loading @@ -153,6 +153,7 @@ void setup() { //function that will be executed again and again and again... void loop() { //call the function for each type of input switchCheck(SwitchButton1, 'a'); switchCheck(SwitchButton2, 'z'); Loading Loading @@ -181,7 +182,6 @@ void loop() { ButtonCheck(threeWay3A, 'w'); ButtonCheck(threeWay3B, 'x'); ButtonCheck(rotaryEncoder1Button, 'c'); ButtonCheck(rotaryEncoder2Button, 'v'); ButtonCheck(rotaryEncoder3Button, 'b'); Loading @@ -194,8 +194,10 @@ void loop() { rotaryEncoderChar(rotaryEncoder4A, rotaryEncoder4B , '7' , '8'); rotaryEncoderChar(rotaryEncoder5A, rotaryEncoder5B , '9' , '-'); analogJoyAxisCheck(joystickX , joystickY); ButtonCheck(joystickButton, '*'); /* analogJoyAxisCheck(joystickX , joystickY); */ } //this function manage the analog joystick Loading