What's new

buffi

Grand Master
Joined
Aug 12, 2019
Messages
514
Reaction score
673
Location
Sweden
Not sure why noone has done this before(?), but I needed an autofire circuit with more settings than that passive autofire circuit from arcadeotaku wiki, so I just threw one together with a cheap (<$5) Arduino Nano clone.

Supports:
- 3 inputs mapped to three autofire outputs
- On-board LED blinks whenever any "shot" is fired for any button.
- Per button selectable frequency / duty cycle. Example settings:

Code:
# Shoots for one frame, the waits two frames, repeat.
# This means 20hz 1-frame pulses.
AutofireConfig BUTTON_1 = {
  /*frames_active=*/1,
  /*frames_inactive=*/2,
  /*input_pin=*/12,
  /*output_pin=*/11,
  /*autofire_state=*/0  
};
This makes it possible to configure obscure autofire settings like for Mushihimesama where you want to have something like this six button configuration:
A, B, C,
A(20hz), A(4hz), C(20hz)

Simple configs (like just making one button autofire at a specific frequency) are obviously possible as well.

Currently have this hooked up in my cab in a super ugly way, for just a simple autofire configuration that works well.
Will flesh out this a bit, and then release the code.

Total build cost is <$5, since you can just buy a cheap Arduino Nano clone off aliexpress and put some terminal blocks on it.

Pic:
cpeQx8W.jpg


Video just showing it blinking:
https://youtu.be/hR4sUmuJU5o
 

RGB

Champion
Joined
Jul 21, 2015
Messages
801
Reaction score
1,732
Location
Europe

buffi

Grand Master
Joined
Aug 12, 2019
Messages
514
Reaction score
673
Location
Sweden
Not sure why noone has done this before(?), but I needed an autofire circuit with more settings than that passive autofire circuit from arcadeotaku wiki, so I just threw one together with a cheap (<$5) Arduino Nano clone.
https://shmups.system11.org/viewtopic.php?p=912130 ;)
And before the RECO, I built a simple NE555 version that allows to have a "normal" and "autofire" button - https://live.staticflickr.com/2618/...0RC0UwQYIPzETtGeEzg94bnXvPvJxMFNh5ue5yQvWkzxQ
Yeah, I've seen RECO and it seems great. Hooking it up to the sync is super smart, and it seems like a generally really useful device.

The main thing about this one though is that it just uses super cheap off the shelf hardware, that you can get anywhere, and then plug into your panel and be good to go, while supporting any possible config you may want.

Upgrading it is as easy as turning off your cab, putting in a USB cable from your laptop and flashing a new Arduino Sketch.

It's just such an obvious implementation that I'm surprised I haven't seen it before.
 

rememberizer

Student
Joined
Mar 6, 2019
Messages
57
Reaction score
22
Location
Philippines
buffi, do you still have the sketch for this? I want to wire console sticks with this, too. The lack of autofire has really been putting me off from playing some games.
 

nem

Enlightened
Joined
May 29, 2016
Messages
3,928
Reaction score
2,996
Location
Finland
I just bought a bunch of Nanos, so I would love to try this as well, @buffi.
 

buffi

Grand Master
Joined
Aug 12, 2019
Messages
514
Reaction score
673
Location
Sweden
Uh, I sortof abandoned this a long time ago, but the old code is here:
https://github.com/buffis/openpewpew/blob/master/openpewpew/openpewpew.ino

I haven't really checked it much for bugs, but sortof worked. It's pretty simple, so worst case you can make something else based on it.


I have a better version that i've been messing around for esp32/raspberry pi pico that I should finish some time.

IMG_7596.jpg
 
Top