This project is an Arduino-based desktop cleaner robot equipped with an ultrasonic sensor for obstacle detection, a DC motor driver for movement, and an OLED display for real-time distance monitoring.
- Displays "DESKTOP CLEANER" on an OLED screen at startup.
- Uses HC-SR04 Ultrasonic Sensor for measuring distance.
- DC motor control with direction pins for cleaning action.
- Real-time distance feedback on OLED and Serial Monitor.
- Stops when objects are far; activates motor when close.
- Arduino UNO / Nano / Mega
- DC Motor + Driver (L293D / H-Bridge)
- HC-SR04 Ultrasonic Sensor
- SSD1306 OLED Display (128x64)
- Power Supply (Battery/USB)
-
Motor Control
motor1pin1β Pin 2motor1pin2β Pin 3
-
Ultrasonic Sensor
TrigPinβ Pin 9EchoPinβ Pin 8
-
OLED Display
- I2C Communication (SDA, SCL) at address
0x3C
- I2C Communication (SDA, SCL) at address
- Initializes the OLED display and shows "DESKTOP CLEANER".
- Measures distance using the HC-SR04 ultrasonic sensor.
- Displays distance in cm on OLED and Serial Monitor.
- If distance β€ 15 cm β motor runs forward ("LOW DISTANCE").
- If distance > 15 cm β motor stops ("HIGH DISTANCE").
-
OLED Display
DESKTOP CLEANER Distance: 12 cm -
Serial Monitor
Distance: 12 cm LOW DISTANCE
- Connect all components as per pin configuration.
- Install required Arduino libraries:
Adafruit_GFX.hAdafruit_SSD1306.h
- Upload the sketch to Arduino using Arduino IDE.
- Open Serial Monitor at 9600 baud rate.
Developed by MegaZroN (Gaus Mohiuddin Sayyad)
π Portfolio: https://megazron.com
This project is licensed under the terms of the LICENSE file.