If you’ve visited the Wizarding World of Harry Potter and found yourself in possession of an interactive magic wand as a souvenir, then you’ll no doubt be wondering by now, “What do I do with it at home though?”
While the wand was great for setting off window displays at the park itself, it now sits dusty and forgotten upon a shelf. But it still has life left in it — let Jasmeet Singh show you how.
How do Harry Potter interactive wands work?
The interactive displays at Universal Studios’ Wizarding World of Harry Potter have infrared cameras in place, which are ready to read the correct movements of retroflector-tipped wands. Move your wand in the right way, and the cameras will recognise your spell and set window displays in motion. Oooooo…magic!
How do I know this? Thanks to William Osman and Allen Pan, who used this Wizarding World technology to turn cheap hot dogs into their own unique wands! Those boys…
For his Raspberry Pi-enabled wand project, Jasmeet took that same Wizarding World concept to create a desktop storage box that opens and closes in response to the correct flicks of a wand.
A simple night vision camera can be used as our camera for motion capture as they also blast out infrared light which is not visible to humans but can be clearly seen with a camera that has no infrared filter.
So, the video stream from the camera is fed into a Raspberry Pi which has a Python program running OpenCV which is used for detecting, isolating and tracking the wand tip. Then we use SVM (Simple Vector Machine) algorithm of machine learning to recognize the pattern drawn and accordingly control the GPIOs of the raspberry pi to perform some activities.
For more information on the project, including all the code needed to get started, head over to hackster.io to find Jasmeet’s full tutorial.