All builds →
Build 03

Teaching the robot to see your hand

The big one: give the robot eyes. It watches through its camera, asks an AI what gesture you're making, and waves — or giggles — back. A real AI app, built in friendly pieces.

🕓 an afternoon 🤖 needs an OpenAI key 🧒 kids 9+ with a grown-up 📷 Reachy Mini + camera
Same three parts as always — the Goal, the Explore (prompts you paste into your AI), and the Output — plus an optional bonus to think about at the end, which matters more in this one. This is the deep end: it needs the robot's camera and a (cheap) OpenAI key, so it's best with a grown-up alongside.
See it work first. Install the finished app on your Reachy Mini, paste your OpenAI key on its settings page, and wave at it. Then read how each piece is built.
Get the app →
1

The goal

Give it eyes

Post 01 gave the robot a voice; Post 02 gave it a reflex. Now the grand finale: sight. We'll have it watch through its camera, ask an AI — in plain English — what your hand is doing, and respond with a matching move and a sound.

Every AI app, from the fanciest assistant down to this, is really the same three steps: capture something, ask the AI about it, act on the answer. Once your kid sees that shape here, they'll spot it everywhere.

2

The explore

Four pieces, one robot

Build it one piece at a time — each prompt gets one thing working before the next. That's the real lesson: big scary projects are just small clear steps in a row.

① · Paste to your AI
See what the camera sees

I have a Reachy Mini with a camera. In the reachy_mini SDK, robot.media.get_frame() returns the current camera image as a numpy array. Write a tiny program that grabs one frame and saves it as a photo, so I can check the camera works.

What to expect First light! You get a photo from the robot's point of view. It proves the camera works before you add any AI — always get one piece working before the next.

② · Paste to your AI
Ask an AI what it sees

Using the OpenAI API in Python, send a photo to a vision model (like gpt-5.6-luna) and ask: "What hand gesture is the person making? Answer with one word." Show me the minimal code, and note that newer models use max_completion_tokens.

What to expect The heart of it: the AI looks at your photo and names the gesture. You'll need a (cheap) OpenAI API key from platform.openai.com — a good moment to talk about keys and secrets.

③ · Paste to your AI
Only look when something moves

AI vision calls cost money, so I don't want to call one constantly. Add a simple "motion gate": compare the last two camera frames and only call the AI when enough has changed. Explain it simply.

What to expect The money-saver: the robot only thinks when something actually happens in front of it. Turns a constant bill into pennies — and it's a lovely idea for a kid: don't work unless you need to.

④ · Paste to your AI
Wave back

When the AI says the gesture is "wave", make my Reachy Mini wave back by moving its head and antennas, and play a giggle. Give me a small dictionary that maps a few gestures to a few responses.

What to expect The payoff: it reacts. Map wave, thumbs-up, peace — each to its own little move and sound. This is where your kid designs the robot's whole personality.

🧒 Kid's corner — Hand the gesture→response map to your kid. Thumbs-down = a sad antenna droop? Peace sign = a happy spin? A fist = a startled jump? They get to decide how the robot feels about everything it sees.
3

The output

A robot that sees you

The finished robot is the Get the app button up top: install it, add your OpenAI key on the settings page, and wave. Here's the sound it plays when it spots you (from Posts 01–02):

The heart of it, in two snippets. First, grab what the camera sees:

from reachy_mini import ReachyMini
from PIL import Image

with ReachyMini() as robot:
    frame = robot.media.get_frame()                       # camera image (numpy array, BGR)
    Image.fromarray(frame[:, :, ::-1]).save("view.jpg")   # flip to RGB, save it
    print("saved view.jpg -- that's what the robot sees")

Then ask the AI what's in the photo — this is the whole "brain":

import base64
from openai import OpenAI

client = OpenAI()                                    # reads your OPENAI_API_KEY
img = base64.b64encode(open("view.jpg", "rb").read()).decode()
reply = client.chat.completions.create(
    model="gpt-5.6-luna",
    max_completion_tokens=2000,                      # newer models use this, not max_tokens
    messages=[{"role": "user", "content": [
        {"type": "text", "text": "What hand gesture is the person making? One word."},
        {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{img}"}},
    ]}],
)
print(reply.choices[0].message.content)              # e.g. "wave"

The full app stitches all four pieces together and hardens them: a background thread does the looking so the motion never stutters, your API key is kept safe (never shown to the model or the browser), and a settings page lets you pick the model and the detection sound. It's all open — read the complete code in the app repo.

Where next? You've built a robot that sees, thinks, and responds. That's… a robot. Go wave at it — and show someone.

★

The bonus

Something to think about

Optional, and not about the robot — but of the three builds, this is the one that earns a proper conversation. To recognise your hand, the robot takes a photo in your home and sends it over the internet to a company's computer. That's not a scary thing; it's just a real thing, and a kid who builds it is old enough to know it.

★ · Paste to your AI
Where does the picture go?

Explain to a 9-year-old what actually happens to a photo when an app sends it to an AI model on the internet: where it travels, who could see it, and how that is different from a program that looks at the photo on your own computer. Then give three simple house rules for deciding what is OK to photograph and send.

What to expect A calm walkthrough: the picture leaves your house, travels to a server, gets read by a model, and an answer comes back. The useful contrast is on-device versus in the cloud — and the house rules are the part worth writing on the fridge.

Then talk about it:

💡 Today we learned — "the robot can see" really means "the robot can send." The interesting question was never whether we could point a camera at ourselves — it's who else ends up holding the picture, and being the one who decides that on purpose.