cropped-HAGIA-2.png
Bentar Wok

Hagia Muhammad Muadz

IT Tutorial Smart Trash Bin

Hello everyone! Today I will explain the code of our Smart Trash Bin project. The code uses an ultrasonic sensor to detect the distance between the trash bin and an object. The micro:bit continuously checks the distance inside a forever loop. If the distance is less than 10 centimeters, the servo motor automatically opens the trash bin lid. If no object is detected, the lid closes again automatically. This system makes the trash bin more hygienic and easier to use.

Scroll to Top