I’m building a custom joystick to be used with Processing via GameControlPlus. Just wondering if the pots should be at center of resistance when the stick is at zero/centered.
Interesting – this is a question for @quark.
I suggest that you test the pots on an existing joystick to find out. Personally I have no information on the internal electronics of a joystick although I think it is the voltage across the pot that is important because you need positive and negative values.
Quark - good to hear from you. I’ve solved that problem - now there is a bigger one.
I can see the joystick movements in your Configurator sketch. But when I try to get x & y data in Processing via the GCP functions no movement is shown - just a constant number. I have worked successfully with GCP with a Logitech 3D stick. Now I have to use a Navy joystick that just has 2 pots and a button. I’m using
an Arduino Micro with the Joystick library which makes the 32U4 show up as a HID device. Everything looks good up to the point of trying to use GCP functions to read x & y which are returning a fixed number.
Since the Configurator sees the chip and displays x-y data I’m suspecting there is something wrong in the way the Joystick library is sending its data - or some other incompatibility with GCP.
To get this going I’m going to abandon GCP and just send the data via the UART on the Micro. I’ve had great success getting Arduino & Processing to talk via Serial so this should be fine.
It is quite puzzling as to why this glitch is showing up - not sure which package is the culprit. Just hoping to get this going & Serial should do it.
Best regards- Alan R.
Would you mind briefly sharing what you learned?
Jeremy - will do once I get word from @Quark.
I’ve spend a full week trying to ‘break thru’ on this and it appears that the Arduino Joystick library (by Matthew Heironimus) for Arduino 32U4 boards is not totally compatible with current GCP Processing library.
As I wrote back to Quark - everything works except when I attempt to read the joystick with the " X = stick.getSlider(“X”).getValue();" function, a single non-changing value is being returned. Note I have used GCP with a Logitech joystick with great success - so this is rather
perplexing that I’m getting the sort of ‘fixed’ response - when the GCP
Configurator shows live data from the 32U4 Micro.
For now I’m just going to send the data via a serial port which should be just fine.
I don’t know how to make GCP and your Arduino Joystick library to talk to each other.
I created GCP because I bought an xbox controller so I could play with my grandson on his XBOX and I wanted to see if I could use it in Processing. The previous library, proControl, was abandoned by its creator but GCP still uses the original system files and JInput which I can’t update.
Hmm - thought that might be the case. I really think it is a short-fall
in the Joystick library - but since I’ve had no luck in contacting it’s
creator - Guess I’ll have to move on and use a CP2104 USB-to-Serial chip
to get the Micro to have a serial port to send to - and can then have
Processing access it via that way. Nearly the same actually - just an
extra chip to do the interface! Thanks for getting back.