CircuitPython_JoystickXL icon indicating copy to clipboard operation
CircuitPython_JoystickXL copied to clipboard

No Joystick X, Y, or Z in windows 10 and 11

Open rmhorwitz opened this issue 1 year ago • 2 comments

I am using the joystick XL library for a game interface with a RP Pico. The buttons are not used, rather I have an HID keyboard interface, as this makes it easier for me to map. However, I do specify two buttons for the joystick which are specified in the boot file. For the X and Y input, I am using an accelerometer. For the Z, I am using one of the A/D channels on the PICO. Everything worked and I was vigorously testing it without any issues. However, sometime between mid-October to mid-November the XY and Z quit working. I am using windows 11. In the windows game controller properties, I see an array of buttons, but no X, Y, or Z values or data, NOTHING! Normally I would see two buttons (which I don't currently use), The X/Y of the joystick and the Z value as a bar graph. I can only think that this is a window update issue. Attached are the boot and code files. These are both open source.
Little_Bang_code_2_0.zip

rmhorwitz avatar Dec 10 '24 22:12 rmhorwitz

I tried your code on a Pico running CircuitPython 9.0.5 (to match the version in your boot_out.txt) as well as CircuitPython 9.2.1 (the latest available) on two different Windows 11 machines, and I get the X, Y and Z axes as well as the two buttons in the Windows "Set up USB game controllers" properties dialog. Have you tried connecting your controller to a different Windows PC to verify that the issue isn't specific to the Windows installation on your development machine?

One thing I did notice (although it shouldn't cause the issue you're experiencing) is that you've renamed __init__.py in the /lib/joystick_xl folder to __version__.py, which results in <module 'joystick_xl.__version__' from '/lib/joystick_xl/__version__.py'> getting written to boot_out.txt instead of the actual JoystickXL version number.

It's also worth noting that your code doesn't actually stay running on my Pico; it errors out because I don't have an accelerometer connected to the appropriate pins. (Again, this shouldn't matter - the USB descriptor reports the axes/buttons you've defined whether or not any code is actually running.) I can, however, run a JoystickXL test console from the CircuitPython REPL and confirm that all axes and buttons register correctly: > from joystick_xl.tools import TestConsole > TestConsole()

fasteddy516 avatar Dec 11 '24 02:12 fasteddy516

FastEddy.  Thanks for the sanity check and correction.  Can I send you a complete board assy for you to play with?  Please give me your address and I'll ship it out to you ASAP.

Rickey

Yahoo Mail: Search, Organize, Conquer

On Tue, Dec 10, 2024 at 9:47 PM, Edward @.***> wrote:

I tried your code on a Pico running CircuitPython 9.0.5 (to match the version in your boot_out.txt) as well as CircuitPython 9.2.1 (the latest available) on two different Windows 11 machines, and I get the X, Y and Z axes as well as the two buttons in the Windows "Set up USB game controllers" properties dialog. Have you tried connecting your controller to a different Windows PC to verify that the issue isn't specific to the Windows installation on your development machine?

One thing I did notice (although it shouldn't cause the issue you're experiencing) is that you've renamed init.py in the /lib/joystick_xl folder to version.py, which results in <module 'joystick_xl.version' from '/lib/joystick_xl/version.py'> getting written to boot_out.txt instead of the actual JoystickXL version number.

It's also worth noting that your code doesn't actually stay running on my Pico; it errors out because I don't have an accelerometer connected to the appropriate pins. (Again, this shouldn't matter - the USB descriptor reports the axes/buttons you've defined whether or not any code is actually running.) I can, however, run a JoystickXL test console from the CircuitPython REPL and confirm that all axes and buttons register correctly:

from joystick_xl.tools import TestConsole TestConsole()

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

rmhorwitz avatar Dec 11 '24 12:12 rmhorwitz