Components and supplies
SG90 Micro-servo motor
Arduino UNO
Jumper wires (generic)
Ultrasonic Sensor - HC-SR04 (Generic)
Cardboard
Tools and machines
Scissor, Electrician
Barbecue stick
Hot glue gun (generic)
Project description
Code
Trash bin
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