You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains the hardware programming files for the Apex Rover robot.
Folders
ESP32: Central WiFi bridge. Receives commands from the mobile app via WebSocket and from the Raspberry Pi via HTTP, then routes them to the Mega or UNO over Serial.
Mega_Movement_Control: Arduino Mega code for BTS7960 motor drivers, L298N linear actuator jacks, MPU6500 IMU, and ultrasonic sensors. Receives commands from ESP32 only. Pushes sensor data to the Raspberry Pi over USB Serial automatically.
Uno_Arm_Control: Arduino UNO code for the camera stand (A4988 stepper + servo). Receive-only — no data is sent back.
Raspberry: Raspberry Pi sensor relay. Reads sensor data pushed by the Mega over USB Serial and forwards it to the ESP32, which broadcasts it to the mobile app via WebSocket.
Communication Flow
Command Flow (Mobile → Robot)
Mobile App
│
│ WebSocket (port 81)
▼
ESP32
├──── Serial2 (TX GPIO17) ──────► Arduino Mega (motors, jacks)
└──── Serial1 (TX GPIO4) ──────► Arduino UNO (camera stand)
Sensor Flow (Robot → Mobile)
Arduino Mega
│
│ USB Serial (automatic push every 10s, or instantly on critical alert)
▼
Raspberry Pi
│
│ HTTP POST /sensor (WiFi — Apex_Rover_Net)
▼
ESP32
│
│ WebSocket broadcast
▼
Mobile App