DIY Aperture Science “Dihydrogen Monoxide” Water Bottle

Aperture Science (a.k.a Aperture Laboratories) is a fictional scientific research corporation, whose facility is the setting for the 2007 puzzle-platform video game Portal, as well as its 2011 sequel Portal 2. Aperture’s approach to scientific research is a little… strange, to put it mildly. They have a penchant for testing exotic materials, building maniacal robots, and creating wholesome musical interludes. And, apparently, coming up with long-winded names for storage containers.

The Aperture Science Handheld Dihydrogen Monoxide Containment Unit was a stainless steel water bottle created and sold by Valve Corporation and ThinkGeek for the release of Portal 2, circa 2011. The bottle came in both 40 oz black and 22 oz white variations, with decals for Aperture Laboratories and a disclaimer about the deadly nature of H₂O. Unfortunately it looks like they stopped selling these several years ago – the product page from the Valve store has vanished entirely, while the ThinkGeek product page has both bottles listed as “no longer available”.

I’m not so easily deterred, so I spent this past weekend building my own “Aperture Science Dihydrogen Monoxide Containment Unit” using a stainless steel water bottle and some custom made vinyl decals.

(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…)

Nintendo Extension Ctrl Library

Late last year when I was putting the finishing touches on the McCree Hammershot project, I decided to use a Wii Nunchuk hooked up to an Arduino for the controller’s movement. Although I eventually got it working, I had to try a variety of libraries before I found one that would even read the data properly. Most of them were convoluted, bloated, or poorly documented. Even the library I eventually ended up using was designed for controlling motors with a Nunchuk, not for just reading control inputs.

It’s now many months later, and once again I’m looking to build at least two more projects using extension controllers. So I decided to fix all of these problems and just build my own library.

(more…)