Components and supplies
Arduino UNO
SG90 Micro-servo motor
Jumper wires (generic)
Ultrasonic Sensor - HC-SR04 (Generic)
Tools and machines
Barbecue skewers
Hot glue gun (generic)
Cardboard
Scissor, Electrician
Project description
Code
Trash bin code
arduino
This is the code I wrote for this project. You need to install the Servo library if you don't have it on your Arduino IDE. Modify the openCloseDelay value to make the lid open and close faster or slower.
Downloadable files
Trash bin schematics
The sensor is supplied by 5V and the servo is connected to 3.3V pin.
Trash bin schematics
Trash bin schematics
The sensor is supplied by 5V and the servo is connected to 3.3V pin.
Trash bin schematics
Comments
Only logged in users can leave comments