USB joystick/gamepad

58 views
Skip to first unread message

charli va

unread,
Nov 12, 2023, 11:22:28 AM11/12/23
to fpga-wars-explora...@googlegroups.com
// English below

Hola a todos! os paso un primer progreso en el módulo usb hid , esta vez soporte inicial para joystick o gamepad.

No tengo ningúno como tal, quiero comprar algún modelo barato que sea asequible para todo el que quiera utilizarlo o probarlo, en principio debería funcionar cualquier dispositivo compatible con usb hid 1.0.

Yo estoy utilizando una placa controladora de joystick para máquina recreativa, son relativamente baratos, valen unos 14€, en aliexpress está el clon o el mismo XD. por 3 o 4


aquí por si alguien esté interesado lo tenga de referencia.

Lo interesante de esta plaquita es que con ella podemos utilizar la interfaz usb joystick como adquisición de cualquier otro sensor o un propio panel de botones que quermaos hacer manualmente, 

Os mando un vídeo , tiene muy mala calidad porque no conseguía con los leds que se viera bien, tengo que ver como grabar mejor estas cosas, básicamente he conectado un simple pulsador al conector del botón 1 del joystick y mediante el circuito que os adjunto la alhambra ilumina un led cuando detecta ese botón en el usb del joystick.

Es un primer acercamiento, si alguien que esté siguiendo estos hilos del usb puede probar un gamepad o joystick estaría muy bien, yo estoy a ver si esta semana compro alguno por probar uno montado, con esta plaquita ha funcionado fenomenal.

Como os digo me parece muy interesante ya no sólo por poder utilizar gamepads para nuestros "inventos" sino que a través de una plaquita de este tipo ampliamos el número de entradas a la fpga con solo un par de hilos y muy pocos recursos de la FPGA.

Me queda cerrar el bloque para el teclado usb y refactorizarlos para hacer una colección de bloques usb y luego pasar a los usb hub para abrir las opciones ya a cualquier tipo de teclado y ratón.

Feliz frikeo!


// ENGLISH

Hello Folks! Here is a first update on the USB HID module, this time with initial support for joysticks or gamepads.

I don't have one myself, so I'm looking to buy an affordable model that anyone can use or test. In principle, any device compatible with USB HID 1.0 should work.

I'm using a joystick controller board for an arcade machine. They are relatively inexpensive, costing around 14€. The clone or the same one is available on AliExpress for 3 or 4€.

Here is the link for anyone who is interested, so they have it for reference.

https://www.amazon.es/Owootecc-Codificador-Raspberry-Bricolaje-Videojuego/dp/B08SC973C8/ref=sr_1_1?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=1GAPFBL3ZZ1LL&keywords=quimat+zero+delay+arcade+usb&qid=1699805331&sprefix=quimat+zero+delay+arcade+usb+e%2Caps%2C112&sr=8-1

The interesting thing about this board is that we can use the USB joystick interface to acquire any other sensor or a custom button panel that we can make ourselves.

I'm attaching a video, but it has very poor quality because I couldn't get the LEDs to look good. I need to see how to record these things better.

 Basically, I connected a simple button to the connector of the joystick button 1 and, through the circuit I'm attaching, the Alhambra illuminates a LED when it detects that button on the joystick USB.

This is a first approach. If anyone who is following these USB threads can test a gamepad or joystick, that would be great. I'm looking to buy one this week to test a mounted one. With this board, it has worked phenomenally.

As I say, I think this is very interesting, not only because we can use gamepads for our "inventions", but also because through a board of this type we can expand the number of inputs to the FPGA with just a couple of wires and very few FPGA resources.

I still have to close the block for the USB keyboard and refactor them to make a collection of USB blocks, and then move on to USB hubs to open the options to any type of keyboard and mouse.

Happy hacking!

usb_hid_test2_gamepad.zip
usb_joy1.mp4

Jo mo

unread,
Nov 12, 2023, 4:32:26 PM11/12/23
to FPGAwars: explorando el lado libre
Thanks for this block Carlos,

I do not have an application for it now,
But i think i will get one of the alliexpress clones , for playing later with your usb hid blocks goodies ! :-)

charli va

unread,
Nov 12, 2023, 4:38:40 PM11/12/23
to fpga-wars-explora...@googlegroups.com
Thanks Joaquim!! I bought it a long time ago to make some arcade type joysticks for my nephews and I ordered a couple extras in case they arrived defective and until now I had them stored in the drawer, at the time I bought them on Aliexpress for 3-4€, but the price you have passed it is devastating XD

At the moment this is helping me understand the USB protocol and play with these simple devices, we'll keep going!

--
Has recibido este mensaje porque estás suscrito al grupo "FPGAwars: explorando el lado libre" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a fpga-wars-explorando-el...@googlegroups.com.
Para ver esta conversación en el sitio web, visita https://groups.google.com/d/msgid/fpga-wars-explorando-el-lado-libre/c303cf72-3d13-4e16-b22e-0dca01acc801n%40googlegroups.com.

Jo mo

unread,
Nov 12, 2023, 5:01:21 PM11/12/23
to FPGAwars: explorando el lado libre
Well the one with the cable cost about 6 euros shipping included! But it is ok! 

USB protocols, like ethernet and all those complex layered protocols, are a big mystery for me ! 
But one day, maybe, i will improve that !

Now, it is time to go to bed Carlos! The UV rays of your screen started darkening your face skin !  :-))
Good night !
Reply all
Reply to author
Forward
0 new messages