View Single Post
Old 06 January 2020, 03:15   #9
Registered User

Join Date: Nov 2019
Location: Poland
Posts: 8
USB Atari-like joystik with rapidfire

Originally Posted by nogginthenog View Post
There's no link prezi.

I attach pictures and Arduino code.

-enclosure Hammond HM-1591USBK
-joystick Sanwa JLF-TP-8YT
-GT-Y Octo Gate
-KOWAL 1mm Oversize Actuator
-2Kg spring from Focus Attack
-two non-original push buttons 30mm
-one LED Red Latching On/Off Switch (as rapidfire switch)
-one arduino clone ATMEGA 32U4 Arduino PRO MICRO
-some cables
-three pieces of wood
-4 threads + 4 screws (to attach joystick plate to wooden pieces)

Joystick is attached to wooden pieces because the enclosure is made of ABS so it's soft. And thanks to that there are no visible screws. In addition joystick is more stable and "heavy".

Both push button are connected together so there is actually just only "button A".

There are many diy projects like that but none of them has an autofire (rapidfire). In most of other projects some crappy "zero delay" encoder board are used. But they are not "zero delay". I bought one and I found that this is usb1.1 and the polling delay is at least 10ms. Just like for instance Competition Pro USB Joystick. In case of arduino projects everybody uses "delay" instruction to debounce joystick.

In attached Arduino code no "delay" instruction is used. Every pin is debounced separately by non-delay counter. Eg. for 10ms fire state cannot be changed but meanwhile you can change up-pin state.
Arduino ATMEGA 32U4 based boards have 1ms USB polling delay. State of pins is read about 50 times per millisecond so 1000hz usb polling rate is real.

edit: is a little bit faster and supports rapidfire without led
Attached Thumbnails
Click image for larger version

Name:	atari-like-inside.jpg
Views:	45
Size:	716.5 KB
ID:	65839   Click image for larger version

Name:	atari-like-ready1.jpg
Views:	45
Size:	638.4 KB
ID:	65840   Click image for larger version

Name:	atari-like-ready2.jpg
Views:	41
Size:	479.4 KB
ID:	65841  
Attached Files
File Type: zip (3.2 KB, 11 views)

Last edited by prezi; 14 January 2020 at 01:01.
prezi is offline  
Page generated in 0.04426 seconds with 12 queries