Source: https://mokxi.com/learn/path/build-magic-wand
Updated: 2026-11-20

All paths

# Build a gesture magic wand

A wand that turns flicks into spells: angles from an MPU6050, poses, a time window and a state machine that recognize spells, LED effects, an IR cast that opens a box, and a battery that lasts.

Arduino Uno R3 Free 6 lessons 5 h 3 chapters 1,672 XP Robotics · Intermediate +150 XP

0 of 6 done

Start the course free Motion as gestures Lesson plan for teachers

What you will build

## 3 projects, built step by step

6 lessons in 3 chapters, about 5 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.

Chapter 1 project

### Recognizing spells

String flicks into spells with a tiny state machine and a pause that ends each one, look them up in a spellbook, and see how the big systems do it with dynamic time warping.
Open it in the simulator

Chapter 2 project

### IR casting

A spell that leaves the wand: an NEC code flashed at 38 kHz through an infrared LED, decoded by the box, which opens its latch only for the right address and command.
Open it in the simulator

Chapter 3 project

### Project: a spell that opens a box

Make the box yours: a secret three-move spell to open it, a spell to lock it, and a wand that sleeps between uses.
Open it in the simulator

The map

## Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

## Gestures

Angles from gravity, poses past a threshold, a window that tells a flick from a tilt, and spells from a spellbook.

Open 205 XP

### Motion as gestures

An accelerometer in the wand’s tip feels which way is down. Turn that into angles, angles into poses, and tell a flick from a slow tilt with a time window.

0 of 5 steps

Start What is in it

Project Locked 410 XP

### Recognizing spells

String flicks into spells with a tiny state machine and a pause that ends each one, look them up in a spellbook, and see how the big systems do it with dynamic time warping.

0 of 5 steps

4 questions, graded as you go.

Chapter 2

## Light and casting

Effects on eight WS2812 LEDs, a spell of your own, and an NEC code at 38 kHz that opens a servo latch.

Locked 174 XP

### Light effects

Every spell needs a look: a white glow, darkness, a blue cast and a flickering fire on eight WS2812 LEDs, and a new spell of your own in the spellbook.

0 of 4 steps

Project Locked 348 XP

### IR casting

A spell that leaves the wand: an NEC code flashed at 38 kHz through an infrared LED, decoded by the box, which opens its latch only for the right address and command.

0 of 4 steps

3 questions, graded as you go.

Chapter 3

## Build it

A LiPo read, budgeted and put to sleep, and a box that opens only for your secret spell.

Locked 187 XP

### Battery

A wand runs on a 500 mAh LiPo. Read the cell, budget the LEDs’ current, dim when the cell runs low, and sleep when nobody is casting.

0 of 5 steps

Project Locked 348 XP

### Project: a spell that opens a box

Make the box yours: a secret three-move spell to open it, a spell to lock it, and a wand that sleeps between uses.

0 of 4 steps

3 questions, graded as you go.

Syllabus

## Every lesson in the course

All 6 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

### Gestures

- Motion as gestures An accelerometer in the wand’s tip feels which way is down. Turn that into angles, angles into poses, and tell a flick from a slow tilt with a time window.
- Recognizing spells String flicks into spells with a tiny state machine and a pause that ends each one, look them up in a spellbook, and see how the big systems do it with dynamic time warping.

Chapter 2

### Light and casting

- Light effects Every spell needs a look: a white glow, darkness, a blue cast and a flickering fire on eight WS2812 LEDs, and a new spell of your own in the spellbook.
- IR casting A spell that leaves the wand: an NEC code flashed at 38 kHz through an infrared LED, decoded by the box, which opens its latch only for the right address and command.

Chapter 3

### Build it

- Battery A wand runs on a 500 mAh LiPo. Read the cell, budget the LEDs’ current, dim when the cell runs low, and sleep when nobody is casting.
- Project: a spell that opens a box Make the box yours: a secret three-move spell to open it, a spell to lock it, and a wand that sleeps between uses.

Keep going

## The next course on your track

Build a gesture magic wand is part of the maker track, a ladder of courses from zero to expert.

Next course

### Build a graphing calculator

Scan a keypad, write a real expression parser, add variables, and plot, zoom, trace and solve on a TFT.
Open the next course

Track

### Maker track

Follow the starter kit you already own, then build a claw machine, a balance bot, a handheld console or an LED cube, each a short course checked by the simulator.
See every course on the track

Kits

## Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

### Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kit

Questions

## About Build a gesture magic wand

Is Build a gesture magic wand free?

Yes. All 6 lessons of Build a gesture magic wand are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Uno R3?

No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does Build a gesture magic wand take?

About 5 hours: 6 lessons in 3 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: Recognizing spells, IR casting and Project: a spell that opens a box.

Where do I start?

With "Motion as gestures", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.
