Diy air mouse

Wearable Finger Air Mouse with Raspberry Pi Pico (Ring Mouse DIY) | Kids Robotics | MakeMindz
MakeMindz

Wearable Finger Air Mouse with Raspberry Pi Pico

Slip it on your finger, point at the screen and the cursor follows! A tiny gyroscope rides on your fingertip, and your thumb taps the buttons to click. It’s a ring mouse you build yourself.

  • Level: Intermediate
  • Time: about 2 hours
  • Ages 11+ (with an adult helper)

What are we building?

A gyroscope feels how fast it turns. If we strap one to your index finger, then every time you point left, right, up or down, the Raspberry Pi Pico knows. It tells your computer to move the cursor the same way. Three little buttons give you left click, right click and a “hold to move” switch.

The gyroscope is the only part on your finger, because it is tiny and light. The Pico lives on a comfy band on the back of your hand or wrist, and a thin, bendy wire joins them.

Wrist band Raspberry Pi Pico + USB cable back of hand index finger thumb MPU6050 sensor leftrightmove thin flexible wire (4 wires)

What you need

PartHow many
Raspberry Pi Pico (with header pins)1
MPU6050 module (GY-521), the smaller the better1
Small tactile push buttons (6 mm)3
Thin, flexible silicone wire (4 colours)about 1 m
Elastic or Velcro strip, about 1.5 cm wide2 pieces
Thin foam sheet or soft felt, double-sided tape1 small piece
Spiral wrap or tape to bundle the wires1
Micro USB cable (with data wires)1
Make it smaller later: The Pico is about 5 cm long, so it sits on your wrist band, not your finger. For a tinier build, a Waveshare RP2040-Zero is about half the size. It uses the same pin names (GP4, GP5, GP13, GP14, GP15), so the code stays the same.
Safety first: Ask a grown-up to help with soldering. Keep bands loose enough that your finger colour stays normal. If your finger tingles, take it off. Never wear it while plugging or unplugging wires.

How it works

  • Read: the Pico asks the gyroscope how fast your finger is turning.
  • Smooth: a smoothing filter takes out small hand wobbles, which matters a lot on a moving finger.
  • Hold to move: the cursor only moves while your thumb holds the “move” button. Let go and you can wave your hand around without the cursor going wild. This is called a clutch.
  • Click: the left and right buttons act like mouse buttons.

Circuit diagram

Raspberry Pi Pico 3V3(OUT)GNDGP4 (SDA)GP5 (SCL) GP14GP15GP13 MPU6050 (on finger) VCCGNDSDASCL red: 3.3V powerbrown: groundblue: data (SDA)green: clock (SCL) Left click (to GND)Right click (to GND)Hold to move (to GND)

Pin table

Pico pinPin numberConnects to
3V3(OUT)36MPU6050 VCC
GND38MPU6050 GND
GP4 (SDA)6MPU6050 SDA
GP5 (SCL)7MPU6050 SCL
GP1419Left-click button
GP1520Right-click button
GP1317Hold-to-move button
GND18 or 23Other leg of all three buttons
3.3 volts, not 5! Power the gyroscope from 3V3(OUT). No resistors are needed for the buttons because the code turns on the Pico’s built-in pull-ups. The four sensor wires and the shared button ground are what run along your hand.

Step-by-step instructions

  1. Test on a breadboard first

    Set up the Pico with CircuitPython and the adafruit_hid library: hold BOOTSEL while plugging in, drag the Pico .uf2 from circuitpython.org onto the RPI-RP2 drive, then copy the adafruit_hid folder from the Adafruit library bundle into lib on the CIRCUITPY drive. Wire the circuit on a breadboard and save the code below as code.py. Check that it works before you build the wearable.

  2. Make the finger band

    Cut a strip of elastic or Velcro that wraps around the middle part of your index finger. Stick a small piece of foam on top as a soft pad. Attach the MPU6050 on the foam with double-sided tape. Keep the board flat on top of the finger, with its printed Y arrow pointing toward your fingertip.

  3. Add the buttons

    Stick the three small buttons on a thin strip along the side of your index finger, where your thumb naturally rests. Join one leg of each button to a shared ground wire. Solder a signal wire to each other leg: left click, right click and hold-to-move.

  4. Make the wrist band

    Fix the Pico to a wide elastic band or wrist strap using Velcro or tape, with the USB port pointing toward your elbow. Solder or plug in the wires as in the pin table. Bundle the wires with spiral wrap, leaving a little slack so the finger can bend freely. Tape the wire to the back of the hand so it does not tug on the solder joints.

  5. Calibrate and play

    Rest your hand on the table and plug in the USB. Keep your hand still for 3 seconds while it learns its resting numbers. Then point your finger, press and hold the “move” button with your thumb, and steer! If the cursor goes the wrong way, change INVERT_X or INVERT_Y.

CircuitPython code

Save this as code.py on the CIRCUITPY drive.

import time
import struct
import board
import busio
import digitalio
import usb_hid
from adafruit_hid.mouse import Mouse

# ---- Settings you can change ----
INVERT_X = 1          # use -1 to flip left/right
INVERT_Y = 1          # use -1 to flip up/down
SPEED_DIVIDER = 500   # bigger = slower cursor
DEAD_ZONE = 120       # ignore tiny shakes
SMOOTHING = 0.6       # 0 = none, 0.9 = very smooth
REQUIRE_HOLD = True   # move only while the "move" button is held

MPU = 0x68
mouse = Mouse(usb_hid.devices)

i2c = busio.I2C(scl=board.GP5, sda=board.GP4, frequency=400000)
while not i2c.try_lock():
    pass
i2c.writeto(MPU, bytes([0x6B, 0x00]))      # wake the sensor up

def make_button(pin):
    b = digitalio.DigitalInOut(pin)
    b.switch_to_input(pull=digitalio.Pull.UP)
    return b

left_btn = make_button(board.GP14)
right_btn = make_button(board.GP15)
move_btn = make_button(board.GP13)

def read_gyro():
    buf = bytearray(6)
    i2c.writeto_then_readfrom(MPU, bytes([0x43]), buf)
    gx, gy, gz = struct.unpack(">hhh", buf)
    return gx, gz

def clamp(v):
    return max(-127, min(127, int(v)))

# ---- Calibration: keep your hand still! ----
time.sleep(3)
sum_x = sum_z = 0
for _ in range(200):
    gx, gz = read_gyro()
    sum_x += gx
    sum_z += gz
    time.sleep(0.005)
offset_x = sum_x / 200
offset_z = sum_z / 200

smooth_x = smooth_z = 0.0
active = True
left_down = right_down = False

while True:
    # Press left + right together to pause or resume
    if not left_btn.value and not right_btn.value:
        active = not active
        mouse.release_all()
        left_down = right_down = False
        while not left_btn.value or not right_btn.value:
            time.sleep(0.05)
        continue

    gx, gz = read_gyro()
    gx -= offset_x
    gz -= offset_z
    smooth_x = smooth_x * SMOOTHING + gx * (1 - SMOOTHING)
    smooth_z = smooth_z * SMOOTHING + gz * (1 - SMOOTHING)

    if active:
        can_move = (not REQUIRE_HOLD) or (not move_btn.value)
        if can_move:
            move_x = move_y = 0
            if abs(smooth_z) > DEAD_ZONE:
                move_x = INVERT_X * (-smooth_z) / SPEED_DIVIDER
            if abs(smooth_x) > DEAD_ZONE:
                move_y = INVERT_Y * (-smooth_x) / SPEED_DIVIDER
            if move_x or move_y:
                mouse.move(clamp(move_x), clamp(move_y))

        if not left_btn.value and not left_down:
            mouse.press(Mouse.LEFT_BUTTON)
            left_down = True
        if left_btn.value and left_down:
            mouse.release(Mouse.LEFT_BUTTON)
            left_down = False

        if not right_btn.value and not right_down:
            mouse.press(Mouse.RIGHT_BUTTON)
            right_down = True
        if right_btn.value and right_down:
            mouse.release(Mouse.RIGHT_BUTTON)
            right_down = False

    time.sleep(0.01)
Pause: press the left and right buttons together to pause or wake the mouse. With REQUIRE_HOLD = True the cursor stays still until you hold the move button, which makes the first test much safer.

Tips and troubleshooting

The cursor is jumpy

Raise SMOOTHING to 0.7 or 0.8, or raise DEAD_ZONE. Make sure the sensor is stuck down firmly and does not wobble on the foam.

The cursor is too fast or slow

Change SPEED_DIVIDER. Smaller is faster and bigger is slower.

Left and right (or up and down) are wrong

Change INVERT_X or INVERT_Y to -1. If the two are swapped, swap gx and gz in the code. This depends on how the sensor sits on your finger.

It stops working when I bend my finger

A wire joint may be loose or pulled. Add slack in the wire, tape it down, and re-solder any weak joints.

I get a “No I2C device” message

Check SDA (GP4) and SCL (GP5), and make sure the sensor is powered from 3V3.

What did we learn?

  • Wearable technology puts electronics on your body, so it must be light, soft and safe.
  • Gyroscopes measure how fast something turns.
  • Filtering smooths out noisy sensor data.
  • A clutch button is a design trick that stops accidental movement.

Try these challenges

  • Make a case for the sensor with a 3D printer or card.
  • Use a Raspberry Pi Pico W or ESP32 with a small battery to go wireless, with an adult’s help.
  • Add a flick gesture to switch slides in a presentation.
  • Control a game or a robot arm with your finger.

Questions kids ask

Why is the Pico on my wrist and not my finger?

The Pico is long and heavier than a finger band should carry. Only the tiny sensor goes on the fingertip.

Can I make it truly ring-sized?

Yes, with a very small sensor board and a tiny microcontroller plus a small battery. That is a bigger challenge, so ask an adult to help.

Does it work with phones and tablets?

Many Android devices accept a USB mouse with an adapter. Check your device first.

Point. Tap. Control the screen! Built your own finger mouse? Share it with us.

Follow MakeMindz for more kids robotics and maker projects.

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
★★★★★ Young inventors love it!
🖨️
3D Print
All parts
⚡
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 ₹300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
★★★★★ Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 ₹200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course