Turtle-Hatchling is an ESP32-based robotics project designed for a robot that collects balls and drops them into a mothership. The robot is controlled wirelessly using a network controller and features motorized wheels for movement, servo-controlled arms for ball collection, and a latch mechanism for releasing balls into the mothership.
- Wireless Control: Uses TurtleReceiver library for network-based control via controller inputs.
- Movement: Differential drive system with two motors controlled by joystick input.
- Ball Collection: Servo-operated arms that can be adjusted to collect balls.
- Latch Mechanism: Servo-controlled latch to open and close for dropping balls into the mothership.
- ESP32 Platform: Built on ESP32 microcontroller with Arduino framework.
- ESP32 development board (upesy_wroom)
- L298N motor driver module
- Two DC motors for wheels
- Four servo motors (two for arms, two for latch)
- TurtleReceiver-compatible controller for wireless input
- Power supply suitable for motors and ESP32
- Servos:
- Arms: Servo1 (GPIO 18), Servo2 (GPIO 19)
- Latch: Servo3 (GPIO 22), Servo4 (GPIO 23)
- Motors:
- Right Motor: IN1 (GPIO 26), IN2 (GPIO 27)
- Left Motor: IN3 (GPIO 14), IN4 (GPIO 12)
- Enable: ENB (GPIO 25)
- PlatformIO installed
- ESP32 board support in PlatformIO
-
Clone the repository:
git clone https://github.com/yashV131/Turtle-Hatchling.git cd Turtle-Hatchling/TurtleHatchlingRobotics -
Open the project in PlatformIO:
platformio init --board upesy_wroom -
Install dependencies:
platformio lib install -
Build the project:
platformio run -
Upload to ESP32:
platformio run --target upload
- Power on the robot and ensure the controller is connected.
- Use the controller's joystick for movement:
- Left joystick: Controls robot movement (forward/backward, left/right)
- Use buttons to control arms and latch:
- Left/Right buttons: Adjust arm angles for ball collection
- B button: Open latch to drop balls
- X button: Close latch
src/: Source code filesmain.cpp: Main program loop and setuparms.cpp/h: Arm control with servoswheels.cpp/h: Wheel motor controllatch.cpp/h: Latch mechanism controlmotorutils.cpp/h: Motor utility functions
lib/TurtleReceiver/: Custom library for network controllerinclude/: Header filesplatformio.ini: PlatformIO configuration
- ESP32Servo: Servo control library
- TurtleReceiver: Custom network controller library
Contributions are welcome! Please fork the repository and submit a pull request.