Building a custom broom controller for Hogwarts Legacy
For fans of Harry Potter, Hogwarts Legacy is a dream game. It drops you into the Potterverse where you can become a wizard, casting spells and riding brooms to your heart’s content. It is a very immersive game, but you lose some of that immersion when you realize you’re actually just pushing buttons on a gamepad. That’s why YouTuber ‘That’s So Mo’ built a custom Hogwarts Legacy controller on a replica Nimbus 2000 broom.
The broom itself is the property of Mo’s friend. It is a very expensive prop replica that looks just like the Nimbus 2000 from the films. Mo couldn’t risk any damage to that, so he attached all of the components to a block of packing foam that can slide on and off the broom handle. Those components include an Arduino, an accelerometer, and an ultrasonic distance sensor.
Thanks to its onboard ATmega32U4 microcontroller, the Arduino is configurable to appear as a USB HID gamepad when connected to a PC. The button presses it sends depend on the orientation of the broom stick and the position of the rider’s body. The accelerometer monitors orientation while the ultrasonic sensor checks the distance to the rider’s torso. So if the rider tucks in close to the Nimbus 2000, the in-game avatar will speed up. If the rider leans right, the avatar will turn right.
With this controller, Mo can play like he’s really riding a broom — at least for as long as his friend lets him borrow the Nimbus 2000!