Single button Kasumi Suzaku followed by a single button Hashinsho
I’ve never really been much of a gamer, but Street Fighter has a special place in my heart; I think back fondly of playing the SFII arcade box at the Panzerotto Pizza joint in grade 7/8.
On a nostalgic whim, I decided to download it from Steam and see what it’s like now; it’s fucking hard! I’d love to blame my controller, but I think years of not really being into video games and getting older has left me with a fraction of the dexterity I once had. I can really only do many of the moves by mashing the crap out of the controller. Enter the Arduino Micro.
For the past few years I’ve been increasingly obsessed with the convenience of using the Arduino as a USB Keyboard – any of the ATmega32U4 based Arduino-like boards can do this. (Leonardo, Micro, Trinket, Due, Zero, etc) Creating hardware that appears as a keyboard to your computer is very convenient. The alternative would be opening a serial connection or tunneling into the hardware device using a wireless technology such as wifi – both approaches are unreliable and cannot be done using the friendlier programming/ scripting languages (javascript for example). Conversely, almost any language allows for trapping keyboard based events; it’s a fairly important part of computing.
Anyway, I made a small button board using the Arduino Micro as a keyboard. Each button (I only had 3 tact switches laying around) is mapped to one of the 11 moves of my character of choice, Ibuki.
Practice has suggested that the fastest the Arduino Micro can broadcast each keypress and still work is about 15ms – plenty fast.
The sketch is fairly simple. There are a set of functions for each of the joystick actions (Full, half and quarter circles) and functions to represent the different key presses (punch/ kick light, medium, hard and all). Each of Ibuki’s special moves are combinations of directional moves and keypresses.
//Hashinsho
circleQuarter(FORWARD);
circleQuarter(FORWARD);
kick(S_ALL);
The major drawback with this approach is that it’s not “ambidextrous” – it matters whether you’re on the left or right side. However, SFIV doesn’t really seem great at figuring out patterns with too much specificity, so you can really just mash a bunch of the keys together to do special moves regardless of the side you’re on.

Oh Cammy; get your head on straight!

I still suck at the game. :)
Back to Top