Inspiration
Challenge proposed from Sponsor Vector to build a rubber duck that can navigate on water.
What brought us together was a shared curiosity: what does it actually take to build something that moves in the real world? We wanted to go beyond pure software and experience the entire process hands-on - from hardware assembly and embedded firmware to high-level control logic. The rubber duck challenge gave us exactly that playground.
What it does
TakeCover is a remote-controlled rubber duck that navigates on water. The duck is steered via an Xbox controller connected to a Raspberry Pi. The Pi runs a Java application that reads the controller inputs and translates them into motor commands, which are sent as UDP packets over WiFi to an ESP32 onboard the duck. The ESP32 receives the commands and directly controls the left and right motors independently - enabling precise differential steering, allowing the duck to move forward, turn, and spin in place.
While driving, the ESP32 continuously streams telemetry data back to the Raspberry Pi: battery level, gyroscope and accelerometer readings.
How we built it
Hardware: ESP32 microcontroller as the onboard brain. Two brushless motors controlled via ESC (Electronic Speed Controllers) with PWM signals (1000–2000 µs). MPU6050 IMU for gyroscope and accelerometer data. Three ultrasonic sensors for obstacle detection. Raspberry Pi as the central control computer. LiPo battery with voltage monitoring via ADC.
Communication Architecture: The ESP32 hosts its own WiFi access point (ESP32-Network). The Raspberry Pi connects to this network and sends UDP commands to the ESP32. The ESP32 listens for incoming UDP packets, parses the JSON commands, and immediately drives the motors accordingly. Sensor telemetry (battery, gyroscope, ultrasonic distances) is streamed back from the ESP32 to the Raspberry Pi every 200ms.
Firmware (Arduino/C++ on ESP32): Listens on UDP port 4211 for motor commands: {"EngineLeft": 30.2, "EngineRight": 34.1}. Maps the percentage values (0–100%) directly to PWM signals (1000–2000 µs) for the ESCs. Controls left and right motor independently, enabling differential steering. Applies EMA filtering on all sensor readings to reduce noise before sending telemetry back.
Control Software (Java on Raspberry Pi): Reads the Xbox controller from the Linux input event device (/dev/input/eventX) as raw binary structs. Translates left and right trigger inputs into motor percentage values. Sends motor commands as UDP packets to the ESP32 in real time. Receives and parses sensor telemetry from the ESP32 for monitoring and autonomous decision-making.
Challenges we ran into
Setting up and integrating the hardware components - ESP32, ESCs, motors, sensors, and battery - was more complex than expected and required a lot of troubleshooting. Getting the duck to drive in a straight line turned out to be a surprisingly tricky mechanical challenge due to motor imbalances. Testing was also constrained by our environment: since the duck only operates on water, every change had to be validated at the pool, slowing down our iteration cycles. On top of that, our team was relatively new to embedded systems and hardware-software integration, so a significant part of the hackathon was spent finding our footing - which ultimately made every small win feel that much bigger.
Accomplishments that we're proud of
We built a cute rubber duck that waddles on water. Given that none of us had done anything like this before, watching it move for the first time made every hour of debugging completely worth it.
What we learned
We learned how to work with the ESP32 and Arduino ecosystem from the ground up — writing firmware, handling WiFi, and sending real-time UDP commands. We gained hands-on experience reading sensor data from an IMU and ultrasonic sensors, and got our first taste of working with voltages above 5V and brushless motors controlled via ESCs. Beyond the technical skills, this project gave us a real introduction to robotics and the unique challenges of operating hardware in a water environment.
What's next for TakeCover
The next steps for TakeCover would be improving straight-line stability by using the gyroscope to automatically correct motor imbalances in real time. From there, we would expand the sensor suite - adding more ultrasonic sensors, better positioning hardware, and eventually a camera — to build towards a fully autonomous duck capable of navigating on its own without any human input.
Built With
- esp32
- raspberry-pi
- xbox-controller
Log in or sign up for Devpost to join the conversation.