Wanduel

Hold your hacker badge like a wand. Chant the spell name. Make the movement. watch the spell appear on a live video portal and hit an opponent on the other side of it.

Inspiration

We all grew up watching Harry Potter, and every wizard duel in it has the same two beats: the wizard says something, and the wizard says something, and the wizard does something. Nobody presses a button.

Almost every magic wand project we'd seen collapses into a trigger, you hold a button wave, release. It works; it feels like a TV remote. We wanted the opposite constraint: no combat button anywhere on the device. If you want to cast the spell called protego you, raise your wand into a guard and say "Protego." Do only one of those, and nothing happens.

The Hack the North badge made that suddenly plausible. It's an ESP32-C3 with a real accelerometer, a 320×240 IPS display and six addressable LEDs, hanging on a lanyard around a thousand necks a wand everyone was already carrying. Add two laptops and two webcams, and the fiction writes itself: the screen becomes an enchanted mirror, your opponent stands on the other side of it, and the spell you cast in the air lands on their face.

What it does

Two players, two laptops, one 60-second duel, 100 health each Find each other with a six digit room code no shared network needed Connect a wand: a custom-firmware badge over BLE, or an iPhone as a fallback. Same wire format either way. Calibrate in thirty seconds a few jabs, guards, and incantations so it learns your grip, not a fixed one. Duel. Say "Stupefy!" and jab for a 20-damage bolt. Say "Protego!" and raise your wand for a 1.2s shield. Expelliarmus exists but stays flagged off until the first two spells clear their accuracy bar. A Python referee decides outcomes damage resolves against whatever shield exists at the scheduled impact time, so a late shield genuinely fails.

How we built it

Four separate parts make up the system. The firmware, written in C++ and using NimBLE streams raw acceleration data. Displays feedback. Firmware does not contain any game rules. The browser, built with React and Three.js breaks motion into segments, transcribes speech combines the two and shows the duel. The browser handles motion. A local faster-whisper worker processes speech. The Python referee, running FastAPI manages health, cooldowns, projectiles and results. The rule that kept us sane was simple: the wand senses, the browser. The referee adjudicates. Badge never claims a spell; Badge only measures. Time. Therefore tuning changes were made by reloading the browser not by reflashing the badge. Every packet is 20 bytes, which fits the baseline BLE MTU. A badge, an iPhone and a recorded trace all use the packet format. Thus one decoder can handle all three devices. Gestures are detected without a gyro. Because there is no gyro we do not have orientation. So we recognize strokes by looking for a jerk at the start and stillness at the end. The direction comes from a weighted average that gives more weight to the peak of the stroke than to the wind‑up. A directedness score removes shaking. Moreover rotating the wand moves gravity across the axes in a way. Therefore we can distinguish a raise from a thrust by checking whether the force is small enough to be rotation. Speech is processed locally. An AudioWorklet connects to the microphone. Passes audio to Whisper for transcription. We require a match. If we allowed matching, a cough three feet away could trigger your spell. Fusing both streams is critical. A cast must include an incantation and a motion that occur within a window. The window is measured from the end of speech. Fairness is achieved by the referee. The referee resolves damage at a scheduled impact. The referee gives players time to react. The referee also makes combat testable, against a clock.

Accomplishments that we're proud of

A real end-to-end duel: say it, move it, land it, block it two people, two laptops, live video. Recovering from a near-brick because we'd backed up first, then fixing the tool so it can't happen again. Solving the sensor bug by measuring, not guessing. One 20-byte format that a real badge, a phone, and a test trace all share. Hundreds of tests across firmware, frontend, and referee. Never adding a hidden button, even at 4 a.m

What we learned

Accelerometer data: The sensor marked samples as bad so half our motions were quietly discarded. It turned out the flag was wrong. We had to look at data timing to show that then stop relying on the flag. Bluetooth issues: Low memory caused the radio to crash when starting up. Some badges never appeared in the connection list. Different reset types required solutions. Couldn't tell movements apart. Jabs and guards seem alike on paper. Both are accelerating. We had to understand the physics of how rotation changes an accelerometer reading to tell "raising the wand" from "thrusting it." Firmware flashing problems. We almost ruined our badge when a flash failed in the middle of writing. A backup. We fixed the tool to stop it from happening again.

What's next for Wanduel

Real-world testing of the badge: boot reliability, battery life, calibration with real people. A full two-player match under real conditions. Turning on our third spell, Expelliarmus, once accuracy is proven. A spectator view, since the referee already tracks the full match.

Built With

Share this project:

Updates

Submission history