Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:48 13 Nov 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite problem to read data from a Generic USB Gamepad

Author Message
Arne
Regular Member

Joined: 05/01/2025
Location: Germany
Posts: 67
Posted: 07:48am 12 Nov 2026
Copy link to clipboard 
Print this post

Hello,

to read data from a generic gamepad I did following steps:

- connect gamepad to USB
- Feedback: Generic Gamepad Connected on channel 3
- Run following program:

DO
PRINT DEVICE(GAMEPAD 3, “B“)
PAUSE 100
LOOP

When I press (and hold) a button on my gamepad the result is always 0.

If first GAMEPAD MONITOR ON was set on every button I press a protocol is printed.

I also tried with interrupt. When I press a button on the gamepad it is recognized but printed also zero only.

Where is my failure in reading gamepad data?

Arne
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12186
Posted: 09:39am 12 Nov 2026
Copy link to clipboard 
Print this post

This appears to be a bug and I'm trying to find when it was introduced. If you boot the Picomite withe the gamepad already connected you should find it works
 
mozzie
Guru

Joined: 15/06/2020
Location: Australia
Posts: 508
Posted: 10:21am 12 Nov 2026
Copy link to clipboard 
Print this post

G'day,
Just purchased a couple of the "Generic" gamepads for input devices on CNC machine. These are not a recognized generic device.

Now I have these setup with GamePad Configure in MM.Startup they work if plugged in on startup as well as subsequent reconnect.

So it may just be the inbuilt support mapping that has failed.

Hope this helps.

Sub mm.startup
Gamepad configure 2064,1,6,1,6,5,255,255,6,4,6,0,4,192,3,192,4,64,3,64,255,255,5,4,5,5,5,7,5,6,255,255,255,255
End Sub


'prog to test joystick

Option default integer

CLS
Print Chr$(27)+"[2J"+Chr$(27)+"[H"; ' clear console

If MM.Info(usb 3) <> 130 Then
 Print @(80,48)"Unplug / Replug Gamepad"
 Do :Pause 100:Loop Until MM.Info(usb 3) = 130
EndIf

Print @(80,48)"Gamepad Button States  "
gameint ' initialise readout

Gamepad interrupt enable 3,gameint

Do :Pause 100:Loop While Inkey$=""

Gamepad interrupt disable 3

End

Sub gameint
 Print @(80,60)BIN$(DEVICE(gamepad 3,b),16);
End Sub


Regards, Lyle.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12186
Posted: 10:28am 12 Nov 2026
Copy link to clipboard 
Print this post

There is a USB host bug that I'm working on
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026