loading
8Comments

Tell us about yourself!

Complete Your Profile
  • Arduino Leonardo/Micro as Game Controller/Joystick

    Hi Matthew,Thanks for your help so far, I hope that at some point you will be able to help. The original script for the multiple joystick worked on the due but as I said, that is only 16 buttons per the 3 joysticks. Knowing not a lot, I am unsure how you would add extra buttons to the joysticks on the original code, that would be perfect but I am completely computer illiterate when it comes to this.RegardsJohn

    View Instructable »
  • Arduino Leonardo/Micro as Game Controller/Joystick

    Hi Matthew,Just wondering if you had any time and managed to look at the Due code to get the new library working?I have now managed to overcome all of my issues apart from a lack of joystick buttons so this really would be a godsend if you have managed to make it work.Thanks in advance for any update which you could provide.RegardsJohn

    View Instructable »
  • Arduino Leonardo/Micro as Game Controller/Joystick

    Many thanks, as a complete novice I am just trying to piece things together for what I need as I am sure you understand.What you have done so far is great and I wish I could do such things but I was trained differently.Knowing nothing, I just made the leap that since the original Joystick3 worked on the Due I was hoping that this would out of the box for the buttons required.A sincere thanks for your help.John

    View Instructable »
  • Arduino Leonardo/Micro as Game Controller/Joystick

    Hi Matthew,This is great and gives me the appropriate amount of buttons that I require and works fantastic on the Leonardo.However when I try to compile for the Due I get this error message below - how do I get the PluggableUSB.h? If I try to use the HID from Arduino library then it all goes wrong.RegardsJohnArduino: 1.6.9 (Windows 10), Board: "Arduino Due (Programming Port)"Build options changed, rebuilding allIn file included from C:\Users\John\Documents\Arduino\New_3_Joystick\New_3_Joystick.ino:1:0:C:\Users\John\Documents\Arduino\libraries\Joystick\src/DynamicHID.h:27:26: fatal error: PluggableUSB.h: No such file or directory #include "PluggableUSB.h" ^compilation terminated.exit status 1Error compiling for board Arduino Due (Programming P...see more »Hi Matthew,This is great and gives me the appropriate amount of buttons that I require and works fantastic on the Leonardo.However when I try to compile for the Due I get this error message below - how do I get the PluggableUSB.h? If I try to use the HID from Arduino library then it all goes wrong.RegardsJohnArduino: 1.6.9 (Windows 10), Board: "Arduino Due (Programming Port)"Build options changed, rebuilding allIn file included from C:\Users\John\Documents\Arduino\New_3_Joystick\New_3_Joystick.ino:1:0:C:\Users\John\Documents\Arduino\libraries\Joystick\src/DynamicHID.h:27:26: fatal error: PluggableUSB.h: No such file or directory #include "PluggableUSB.h" ^compilation terminated.exit status 1Error compiling for board Arduino Due (Programming Port).This report would have more information with"Show verbose output during compilation"option enabled in File -> Preferences.

    Hi Again Matthew,Im using the program slightly modified to work on an Arduino Due (have to include the HID library only) as it has more pins and I need to be able to press multiple buttons at the one time so matrix style does not work for this project. I have managed to get the 3 joystick library to work for additional buttons but how do I overcome the 16 buttons limitation which are on the individual joysticks? I would like to have the full 32 for all the joysticks as I have more buttons than pins.An example script of what I am doing is below as this tests my requirements for each joystick.ThanksJohn#include <HID.h>#include <Joystick3.h>void setup() { Joystick[0].begin(); Joystick[1].begin(); Joystick[2].begin(); // Initialize Button Pins pinMode(2, INPUT_PULLUP); pin...see more »Hi Again Matthew,Im using the program slightly modified to work on an Arduino Due (have to include the HID library only) as it has more pins and I need to be able to press multiple buttons at the one time so matrix style does not work for this project. I have managed to get the 3 joystick library to work for additional buttons but how do I overcome the 16 buttons limitation which are on the individual joysticks? I would like to have the full 32 for all the joysticks as I have more buttons than pins.An example script of what I am doing is below as this tests my requirements for each joystick.ThanksJohn#include <HID.h>#include <Joystick3.h>void setup() { Joystick[0].begin(); Joystick[1].begin(); Joystick[2].begin(); // Initialize Button Pins pinMode(2, INPUT_PULLUP); pinMode(3, INPUT_PULLUP); pinMode(4, INPUT_PULLUP); pinMode(5, INPUT_PULLUP); pinMode(6, INPUT_PULLUP); pinMode(7, INPUT_PULLUP);}void loop() { int button0Val =digitalRead(2); int button1Val =digitalRead(3); int button3Val =digitalRead(4); int button4Val =digitalRead(5); int button6Val =digitalRead(6); int button7Val =digitalRead(7); Joystick[0].setButton(0, !button0Val); Joystick[0].setButton(1, !button1Val); if ((button0Val == 0) || (button1Val == 0)) { Joystick[0].setButton(2, 0); } else { Joystick[0].setButton(2, 1); } Joystick[1].setButton(0, !button3Val); Joystick[1].setButton(1, !button4Val); if ((button3Val == 0) || (button4Val == 0)) { Joystick[1].setButton(2, 0); } else { Joystick[1].setButton(2, 1); } Joystick[2].setButton(0, !button6Val); Joystick[2].setButton(1, !button7Val); if ((button6Val == 0) || (button7Val == 0)) { Joystick[2].setButton(2, 0); } else { Joystick[2].setButton(2, 1); }}

    View Instructable »