Loading repository dataโฆ
Loading repository dataโฆ
Kavin7094 / repository
๐ค GCBOT โ Gamified Cleaning Bot. An AI-powered trash-collecting robot with YOLOv10 waste detection, real-time MJPEG streaming, web-based control panel, and a load-cell scoring system built on Raspberry Pi + Arduino.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
An AI-powered autonomous trash-collecting robot with real-time web control, live video streaming, YOLOv10 waste detection, and a combined AI + weight-based scoring system.
GCBOT is a remotely controlled garbage-collecting robot built for competitions and real-world waste management challenges. It combines:
The entire system communicates over TCP sockets โ the laptop runs the Flask web server, AI inference, and score computation; the Raspberry Pi acts as a bridge between the laptop and the Arduino; and the Arduino directly controls all motors, servos, and the load cell.
Players sign in or create an account before accessing the robot controls. The glassmorphism login card sits on the animated dark background.
/qr)Displayed on a screen at the competition venue. Players scan Step 1 to join the Wi-Fi hotspot, then scan Step 2 to instantly open the control page โ no typing required.
The interface is fully responsive. On portrait mobile it prompts rotation; on landscape it shows the full control panel.
| Portrait (Login) | Landscape |
|---|---|
New players fill in their Full Name, Nickname (shown on leaderboard), choose an avatar, and set a password. The profile is saved and they are logged in immediately.
Shows all players ranked by total score. Each entry displays the player's avatar, nickname, full name, and points earned in the session.
The full-screen landscape control panel with live AI Detection feed, movement D-pad, gripper & arm controls, and the real-time score badge.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GCBOT โ Gamified Cleaning Bot โ
โ โ
โ โโโโโโโโโโโโโโ WiFi/TCP โโโโโโโโโโโโโโโโ Serial/USB โ
โ โ LAPTOP โโโโโโโโโโโโโโโบโ Raspberry Pi โโโโโโโโโโโโโโโโโโโโบ โ
โ โ โ โ โ โ
โ โ Flask App โ โ pi_control โ โโโโโโโโโโโโโโโ โ
โ โ (Port 5001)โ โ (Port 5000) โ โ Arduino โ โ
โ โ โ โ โ โ โ โ
โ โ YOLOv10 โโโโ Video โโโโบโ Camera โ โ Motor Driverโ โ
โ โ Inference โ (Port 9999)โ Stream Tx โ โ Servos (x4) โ โ
โ โ โ โ โ โ Load Cell โ โ
โ โ Web UI โโโโ Cmds โโโโโบโ Serial Relay โ โ HX711 โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โฒ โ
โ โ HTTP (Browser) โ
โ โโโโโโโดโโโโโโโ โ
โ โ Any Device โ (Phone / Tablet / PC on same network) โ
โ โโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
graph TD
%% Define Node Styles
classDef component fill:#ffffff,stroke:#333333,stroke-width:1px;
subgraph Tier3 ["Tier 3: Host / Fog Layer"]
Browser[("Web Browser (Mobile/PC)\nControl UI & Video")]:::component
Flask["Flask Web Server"]:::component
YOLO["YOLOv10 Inference Engine"]:::component
Browser <==>|HTTP / WebSocket| Flask
Flask <==>|Frames / Classes| YOLO
end
style Tier3 fill:#e3f2fd,stroke:#1565c0,stroke-width:2px;
subgraph Tier2 ["Tier 2: Edge Layer"]
Pi["Raspberry Pi 4"]:::component
Cam[("USB Web Camera")]:::component
Cam -->|Raw Video| Pi
end
style Tier2 fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px;
subgraph Tier1 ["Tier 1: Hardware Layer"]
Arduino["Arduino Uno"]:::component
L298N["L298N Motor Driver"]:::component
Motors(("4x DC Motors")):::component
Servos(("4x Servo Motors\n(Arm & Gripper)")):::component
HX711["HX711 Amplifier"]:::component
LoadCell[("1Kg Load Cell")]:::component
Arduino -->|PWM Signals| L298N
L298N -->|Power| Motors
Arduino -->|PWM Signals| Servos
HX711 -->|Digital Weight Data| Arduino
LoadCell -->|Analog Signal| HX711
end
style Tier1 fill:#fff3e0,stroke:#e65100,stroke-width:2px;
%% Cross-layer connections
Flask ==>|TCP Control Commands| Pi
Pi ==>|MJPEG Video Stream| Flask
Pi <==>|Serial USB| Arduino
sequenceDiagram
participant Browser as ๐ Browser
participant Laptop as ๐ป Laptop (Flask)
participant Pi as ๐ Raspberry Pi
participant Arduino as โก Arduino
Browser->>Laptop: HTTP POST /cmd {"cmd": "F"}
Laptop->>Pi: TCP "F\n" (Port 5000)
Pi->>Arduino: Serial "F\n"
Arduino-->>Arduino: forward()
Browser->>Laptop: HTTP GET /video_feed
Pi-->>Laptop: TCP Video Frame (Port 9999)
Laptop-->>Laptop: YOLOv10 Inference โ tracks last_detected_class
Laptop-->>Browser: MJPEG Stream
Note over Browser,Arduino: DROP OBJECT Flow (AI + Weight Scoring)
Browser->>Laptop: POST /cmd {"cmd": "WEIGHTNOW"}
Laptop->>Laptop: weighnow_pending = True
Laptop->>Pi: TCP "WEIGHTNOW\n"
Pi->>Arduino: Serial "WEIGHTNOW\n"
Arduino-->>Arduino: HX711 read โ diff = current - lastWeight
Arduino-->>Pi: Serial "W:23.45\n"
Pi-->>Laptop: TCP "W:23.45\n" (broadcast)
Laptop-->>Laptop: compute_combined_score(23.45g)
Note over Laptop: score = round(base ร (1 + 23.45/100))
Laptop-->>Browser: JSON {score: 12, event: {cls: "Bottle", pts: 12, weight: 23.5}}
| Feature | Description |
|---|---|
| ๐ฎ WASD / D-pad Control | Move forward, backward, left, right with keyboard or touch |
| ๐ฆพ Arm Lift Control | Dual servo arm with animated angle ring indicator |
| ๐ค Gripper Control | Dual servo gripper (open/close) with visual feedback |
| ๐๏ธ Drop Object | One-tap: releases gripper โ waits 2s โ weighs โ combines AI class + weight โ scores |
| ๐ท Live Camera Feed | MJPEG stream from Pi camera at ~30 FPS |
| ๐ค AI Detection Feed | YOLOv10 trash overlay feed (host only) with toggle |
| ๐ AI + Weight Scoring | Score = base_pts ร (1 + weight_g / 100) โ heavier + rarer = more points |
| โ๏ธ Load Cell Integration | HX711 reads weight diff on command, laptop combines with AI class |
| ๐ฑ Mobile Responsive | Landscape-optimized with portrait rotation hint |
| โก Low Latency | TCP_NODELAY + no blocking delays = near-zero command lag |
| ๐ Auto-Reconnect | All TCP connections auto-reconnect on drop |
| Component | Quantity | Purpose |
|---|---|---|
| Arduino Uno | 1 | Motor & servo control, load cell reading |
| Raspberry Pi 4 | 1 | Video streaming, TCP bridge to Arduino |
| L298N Motor Driver | 1 | 4WD motor control |
| DC Gear Motors (TT Motor) | 4 | Drive wheels |
| SG90 / MG90S Servo | 4 | 2ร Arm lift + 2ร Gripper |
| HX711 Load Cell Amplifier | 1 | Weight sensing for scoring |
| Load Cell (1kg) | 1 | Detects collected trash weight |
| Pi Camera Module | 1 | Live video stream |
| 3S LiPo / 18650 Pack | 1 | Power supply |
| Robot Chassis (4WD) | 1 | Physical body |
Arduino Uno
โโโ Pin 2 โ L298N IN1 (Left Motor A)
โโโ Pin 3 โ L298N IN2 (Left Motor B)
โโโ Pin 4 โ L298N IN3 (Right Motor A)
โโโ Pin 7 โ L298N IN4 (Right Motor B)
โโโ Pin 8 โ L298N ENA (Left Motor PWM)
โโโ Pin 12 โ L298N ENB (Right Motor PWM)
โโโ Pin 5 โ Gripper Servo A (grabA)
โโโ Pin 6 โ Gripper Servo B (grabB) [mirrored]
โโโ Pin 9 โ Lift Servo A (liftA)
โโโ Pin 10 โ Lift Servo B (liftB) [mirrored]
โโโ Pin A0 โ HX711 SCK
โโโ Pin A1 โ HX711 DT
| Layer | Technology |
|---|---|
| Web Framework | Flask (Python) |
| AI Inference | Ultralytics YOLOv10 (best.pt) |
| Computer Vision | OpenCV (cv2) |
| Video Protocol | MJPEG over HTTP (multipart) |
| Control Protocol | Raw TCP sockets with TCP_NODELAY |
| Serial | PySerial (Pi โ Arduino) |
| Frontend | Vanilla HTML/CSS/JS with glassmorphism UI |
| Fonts | Google Inter |
| Microcontroller | Arduino C++ with Servo.h + HX711.h |
| Pi Script | Python threading + socket server |
The onboard AI model is a custom-trained YOLOv10 fine-tuned on a multi-class garbage detection dataset. It runs locally on the laptop CPU in a dedicated inference thread at 416ร416 resolution.
Aluminium foil ยท Bottle ยท Bottle cap ยท Broken glass ยท Can ยท Carton ยท Cigarette ยท Cup ยท Lid ยท Other litter ยท Other plastic ยท Paper ยท Plastic bag/wrapper ยท Plastic container ยท Pop tab ยท Straw ยท Styrofoam piece ยท Unlabeled litter