Harry Potter and the Raspberry Pi Powered Wand

Harry Potter Wand Dual with Raspberry Pi
(Image credit: https://www.youtube.com/@ThatsSoM0)

We've no idea if Computer Science is taught at Hogwarts, but if it were then we're sure that the Raspberry Pi would play a major part in it. Tired of casting spells at the press of a button, this project from Mo "That's-so-Mo" uses the wand from a Harry Potter Coding Kit and a Raspberry Pi Zero W as a gesture controller for the recently released Hogwarts Legacy game.

i_used_a_rpi_zero_w_and_a_kano_wand_to_cast from r/raspberry_pi

Mo's project is great. Sure we can mash buttons to cast spells, but the gesture controller adds a little more authenticity to the action. The wand itself is Kano's officially licensed Harry Potter wand. If the name Kano sounds familiar it is because of its earlier kits which merged the original Raspberry Pi hardware bundled with its own orange keyboard and many computer science based projects. The wand is meant to be used as a means to learn coding, but Mo's project uses it for something much more fun.

The project is built using a Python module from GammaGames, this handles scanning for wands and capturing gestures over a Bluetooth connection. Mo's project uses this module to capture the gestures which are then converted into keypresses that are then sent to the PC running Hogwarts Legacy. The keypresses are transmitted to the PC by cleverly turning the Raspberry Pi Zero W (a Raspberry Pi Zero 2 W could also be used) into a USB HID device. Here is where Mo elevates the project from simple controller to a real wand. The Harry Potter community has carefully curated the movements required for each spell to be cast. Mo has incorporated these movements as gestures and now you'll need to adapt your swishes to use "Lumos", "Wingardium Leviosa" or if you're ready for some time in Azkaban, "Avada Kedavra".

This fun project is a credit to Mo. It is much more than a simple USB HID device, it is magic for those wishing to immerse themselves in the world of Harry Potter. 

Head over to Mo's GitHub repository to learn how you can join the next Compute Science class at Hogwarts.

Les Pounder

Les Pounder is an associate editor at Tom's Hardware. He is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training program "Picademy".

  • Metal Messiah.
    Cool ! This project looks promising. Only if I currently had an RPI zero at my disposal. Casting my own spell right now....
    "abracadabra" ,