Embedded robotics · Penn MEAM 5100
ROBA: Mobile Robot and Embedded Control
Fall 2025
A physical competition robot connecting gamepad commands, wireless communication, range sensing and optical localization to a four-wheel drivetrain and servo mechanism.
- ESP32
- Arduino / C++
- Python / Pygame
- UDP / UART
- Vive
A complete robot, from structure to control

ROBA combines a laptop driver station, an ESP32 FeatherS2 master and an ESP32-C3 sensor board. Manual commands, wall-follow feedback and Vive target navigation share the master's motor outputs. A servo sweeps the upper mechanism, while dedicated commands trigger predetermined competition-task sequences.
Public GitHub repositoryFinal project reportSetup, wiring and protocols
Recorded hardware demonstrations
Arena demonstrations with the original audio: wall-side traversal, a corridor maneuver and target contact.
Use the video controls to play, pause and adjust volume.
Mechanical design and embedded architecture


The report describes four geared DC motors driven in left/right pairs through H-bridges. A movable 3D-printed bumper supports repeated contact, and the two raised Vive receivers are positioned to reduce occlusion by the mechanism and wiring. The report records supply sensitivity and sensor noise; these shaped the final task strategy.
Sensing and communication
The C3 reads two right-facing HC-SR04 ultrasonic sensors and a front VL53L0X time-of-flight sensor. It rejects invalid readings, handles short misses and sends integer centimetres as DIST:RB,RF,F over 115200-baud UART. The master applies median-of-three filtering before wall control. The 70 ms acquisition schedule is a configured interval, not a measured fixed sensor rate.
The Python station uses Pygame to read an Xbox-compatible controller, then sends newline-terminated UDP messages to the robot's Wi-Fi access point at 192.168.4.1:4210. The laptop receives diagnostic messages on port 5005. Manual commands are discrete directions rather than proportional throttle.
Hardware pins and message formats
Master motor PWM: GPIO 3/7; servo: GPIO 11; Vive inputs: GPIO 12/14; UART RX/TX: GPIO 44/43. Slave UART RX/TX: GPIO 20/21; ultrasonic trigger/echo pairs: 4/5 and 8/10; ToF SDA/SCL: 7/6.
Mode commands are J/W/V. G arms wall following, T toggles servo sweep in joystick mode, TARGET accepts one coordinate, TARGET2 queues two, and AL/AH/AN invoke timed task routines. Full wiring, power and setup requirements are in the operating guide.

Manual drive, wall following and target navigation
| Mode | Inputs and control behavior |
|---|---|
| Manual | Axes 0/1 with a 0.25 deadzone select forward/backward/left/right/stop. A selects wall mode; B selects Vive mode; LB toggles servo sweeping. |
| Wall follow | RB arms motion. Right distance and angle corrections track a 10 cm target; a stable front range below 25 cm for three control ticks invokes a left turn. |
| Vive navigation | Two receiver readings estimate position and heading. Filtered rotate/drive states align with a target and advance; the implemented queue accepts two targets. |
| Task sequences | AL/AH/AN run fixed-duration motor sequences. They are separate from feedback target navigation and do not perform obstacle replanning. |
Vive heading alignment uses a 3° threshold and arrival uses a 100-unit position threshold in the interface's coordinate units. Vive position jitter motivated timed sequences for capture tasks.
Servo mechanism and competition-task execution
The master generates a 50 Hz servo signal with a 600–2400 µs pulse sweep, advancing in 20 µs steps. The joystick shoulder command toggles continuous sweeping. The timed tower/nexus routines operate the drivetrain; the code does not make their stopping behavior depend on bumper contact.
Our team earned a third-place alliance finish in the Penn MEAM 5100 robotics competition. Timed routines made task execution repeatable, while opponent interference could still block the route.
Reproduce the software and inspect the system
The repository includes the Python driver station, master/slave firmware, report, wiring and protocol guide, dependency instructions and build checks. Firmware uses Arduino-ESP32, the original Penn Vive interface and the ToF library.
Source repositoryExecuted checksFinal report
See the operating guide for setup, mode cancellation, stop handling and link-loss behavior.
Developed as a Penn MEAM 5100 team project.