Hyperedge- . IoT, Embedded Systems, Artificial Intelligence,

The first Guitar Hero game hit shelves in 2005 and kickstarted the rhythm game revolution. While it wasn’t the first rhythm game, its inclusion of “realistic” guitar controllers changed the industry. It wasn’t long before competitor Rocksmith took things a step further and let players use real electric guitars. But guitars are so common; if you want to stand out, you go for the brass. That’s why Greig Stewart (AKA Theremin Hero) built this custom controller for the Trombone Champ game.

Trombone Champ is currently enjoying viral attention thanks to its quirkiness. To play the game, the user drags their mouse cursor up and down to mimic moving a trombone’s slide and clicks their mouse to blow air. Like Guitar Hero and most other rhythm games, the goal is to hit the notes with the most accuracy possible. But Theremin Hero correctly surmised that moving a mouse is nothing like playing a real trombone, so he converted a cheap trombone kazoo toy into a controller for Trombone Champ.

The toy kazoo looks like a tiny trombone and the slider does alter the pitch, but it isn’t tuned at all and so analyzing the pitch isn’t useful. So Theremin Hero chose to tie the toy’s slider position to the mouse cursor position in the Y axis and any sound coming from the kazoo triggers a mouse click. Their custom computer software handles the latter by listening through any microphone connected to the computer, but monitoring the slider position was more difficult and required an Arduino.

To get an accurate measurement of the slider position, Theremin Hero used an Arduino Nano board and a VL53L1X Time-of-Flight (ToF) sensor. ToF sensors work like one-dimensional LIDAR and calculates distance by measuring the time it takes for a laser pulse to bounce off an object and return to the sensor. The ToF sensor calculates the distance and the Arduino sends that data to the computer software via Serial. The software then translates the distance into a coordinate for the mouse cursor.

As you can see, this works very well and looks like a lot of fun to play. 

Boards:Nano
Categories:Arduino

Read more about this on: Arduino Blog