Hardware & Code & References

Build


Hardware

Arduino Uno R3Microcontroller

Reads potentiometer values and drives the motor outputs via digital pins.

MG996R Servo MotorsActuation

High-torque servos for each finger joint — providing precise, repeatable movement.

10 kΩ PotentiometersSensing

Analogue inputs (A0, A1) that feed positional data back to the control loop.

L298N Motor DriverMotor Control

H-bridge module that translates Arduino output signals into motor direction and speed.

InMoov Hand (3D Printed)Structure

Open-source hand design by Gael Langevin — printed in PLA and used as the mechanical chassis.

USB WebcamVision Input

Captures the user's hand in real time, feeding frames into the gesture recognition pipeline.

Flex SensorsGesture Input

Measure finger bend angles on the control glove, used as an alternative input method.

Jumper Wires & BreadboardPrototyping

Standard prototyping components for rapid iteration without permanent soldering.


Code

Machine Learning — gesture recognition pipeline
ml / gesture_pipeline.pypseudocode
# 1. Load models
hand_detector  ← load_model("mediapipe_hands")
gesture_model  ← load_model("sarra_gesture_classifier")

# 2. Open camera
stream ← open_camera(device=0)

# 3. Inference loop
LOOP:
  frame     ← stream.read()
  landmarks ← hand_detector.detect(frame)   // 21 keypoints

  IF landmarks found:
    gesture ← gesture_model.classify(landmarks)
    serial.send(gesture)                     // → Arduino
View full code on GitHub  ↗
Robot Hand — Arduino servo control loop
cerebrum / Forearm / Forearm.inopseudocode
// 1. Initialise
servos ← attach([pin3, pin5, pin6, pin9, pin10, pin11])
serial.begin(9600)

// 2. Control loop
LOOP:
  IF serial.available():
    gesture ← serial.read()
    angles  ← map_gesture_to_angles(gesture)

    FOR EACH servo IN servos:
      servo.write(angles[servo.id])

    delay(15ms)
View full code on GitHub  ↗

References