Playing Spin Rhythm XD with a Modified DJ Hero Controller

A few weeks ago, a friend of mine introduced me to a new rhythm game. Unlike previous titles such as Guitar Hero or Rock Band that use multiple discrete buttons in order to match different notes, this game used a virtual wheel – an analog input to slide, spin, and tap along with the beat. To top it off the game featured an electronic music tracklist and was a blast to play.

The game is called Spin Rhythm XD, and it was designed to be played with a DJ MIDI controller. Having no such professional DJ-ing equipment handy I decided to do the next best thing: convert my old plastic Wii DJ Hero turntable into a controller for Spin Rhythm XD!

(more…)

Flashing the BIOS to Fix a “Bricked” Lenovo Laptop

A few months ago I was attempting to reformat my laptop as a dual-boot machine with both Ubuntu and Windows 10 and I was having issues getting the boot manager to properly detect both operating systems. Shortly after changing a setting in the BIOS related to SATA operation, the laptop suddenly stopped working after rebooting. Powering it on resulted only in a pure black screen where after approximately fifteen seconds it flashed “Lenovo Misto Ontario”, and then nothing. It was true and thoroughly “bricked”.

I tried everything I knew to fix it, including pulling the CMOS battery, reformatting the hard drive, and trying to ‘auto-flash’ the BIOS from a USB drive – nothing worked. I’ve had this little Lenovo S205 netbook for a few years and although it’s gotten slower it’s always served me well.  And since it was working perfectly fine up until it er, wasn’t… it seemed like a waste to just throw it out without trying my best to fix it.

I’m happy to say that I succeeded. The solution was to reflash the BIOS chip with a replacement BIOS I found online, using an open source program called ‘flashrom’ and an Arduino acting as an SPI flash programmer. Here’s how I fixed it.

(more…)

How to Emulate an Xbox Controller with Arduino (XInput)

In my opinion, one of the more novel things you can do with an Arduino is put it to use as a custom game controller for your favorite games. Whether you’re retrofitting a Nerf gun, converting a rhythm controller to play an FPS game, or playing PUBG with a frying pan – using an Arduino makes it quick and easy to build your own custom controller.

In this tutorial, I’m going to show you how to program your own Arduino to emulate an Xbox controller using the ArduinoXInput library.

(more…)

Arduino XInput Library

Recently I’ve been playing around with building various alternative controller projects for games, typically using an Arduino-compatible microcontroller acting as an HID input device of some sort. The Arduino ecosystem makes it easy to set up these projects to act as either a Keyboard, a Mouse, a DirectInput Joystick, or a composite device that’s a combination of the above. Unfortunately back in 2005 DirectInput was supplanted by XInput with the release of the Xbox 360 controllers, and modern games have been weaning off of it ever since.

These days, many mainstream games barely support DirectInput at all. Games like Rocket League and Overwatch won’t even recognize a DirectInput joystick – you have to use XInput controller emulation software that can be tricky to set up and doesn’t work with every game.

Wouldn’t it be great if there was a simple, turnkey way to make your Arduino emulate an Xbox controller and work out of the box with these newer games?

(more…)

Experiment: Wii Nunchuk Controller for CS:GO

Earlier this week I was browsing Reddit and came across this interesting post of someone playing a game of Counter-Strike: Global Offensive (CS:GO) using a Wii Nunchuk to aim. They used a cheap Chinese “Classic Controller to USB” adapter to connect the Nunchuk to their PC, then set up JoyToKey to convert the gamepad inputs into mouse movements.

This was pretty interesting, but I thought I could do one better. You see, I’m currently working on my own project that uses two Nunchuks for a custom controller. So when I ran across that Reddit post, I already had a breadboard on my desk with a Teensy LC, two NXC breakout boards, and two Wii Nunchuks wired and ready to go. Destiny was calling…

(more…)

HID Buttons Library for Arduino

As I keep working on a number of custom controllers using Arduino boards, I noticed that I tended to build the same sort of data structures every time; things to make it easier to write my own code using the built-in Arduino libraries. One of these bits I kept rebuilding was a wrapper class for the keyboard and mouse libraries that kept track of the keys I was using and their associated output states so that I could set them with a single line of code. Now instead of building yet another version of the same thing for my next project, I decided to turn it into a library instead.
(more…)

DIY Media Key Footswitch for PC

I spend a fair amount of time down in my garage working on things, and while I’m doing that I like to listen to music. I set up an old computer that runs Spotify and sends the audio to a pair of bookshelf speakers. This setup works great, but it requires using a keyboard and mouse to control it. Often times my hands will be gloved and coated with something nasty: grease, epoxy resin, paint, you name it. So I wanted to come up with some sort of method to control my music when my hands were unavailable.

This is what I came up with: a two button footswitch controller that connects with USB and handles play / pause, next track, previous track, and volume.
(more…)

Playing Lucio with a DJ Hero Turntable

Earlier this year while I was hard at work on the Nintendo Extension Ctrl library, I challenged myself to try and support as many different types of controllers as possible. As a part of that I picked up a DJ Hero controller for the Nintendo Wii on Ebay for $10.

And then it hit me: with a little bit of effort, I could write some code that would allow me to play the character of Lucio in Overwatch using this turntable! So that’s exactly what I did.

(more…)