Close

Talking to the ESP32

A project log for EWNA Hackathon Team 1 (Team Marker My Words)

A 4-DOF arm on an Arduino UNO Q that sees a hand-drawn line, picks up a marker, traces it, dodges obstacles live, and puts the marker back.

shubhan-mitalShubhan Mital 4 hours ago0 Comments

Our system has two jobs: working out where the arm should go, and making the servos actually get it there. The ESP32 handles the second. Here's how the two sides talk to each other.

The planning code works in real-world millimetres on the paper. For each point on the path, it uses inverse kinematics(based on our measured arm lengths) to work out the angle for each joint, adjusts for each servo's individual calibration, and sends the angles to the ESP32 over a USB serial connection as a short text message.

We designed a simple set of commands:

The ESP32 moves each servo smoothly to its new angle, updating about 50 times a second, and only replies "done" once the move is actually finished. That means the planning code never has to guess how long a move takes: it just waits for the confirmation and sends the next one. If anything goes wrong, the arm goes to a safe "park" position (claw open, pen lifted, home) instead of freezing mid-move.

We also started with a different approach, fitting servo angles by moving the arm onto all 12 calibration dots by hand. Once we'd measured the arm's real lengths, we switched to direct inverse kinematics, which we verified against 500 random target points with zero error.

Discussions