Introduction: Surprise Box
This Arduino project is derived from https://www.instructables.com/id/Simple-Arduino-an...
I've added my own extension to this project.
Step 1: Step 1: Prepare All Materials and Tools
Creating this surprise box, you need the materials shows in the following:
1. Arduino UNO R3
2. One HC-SR04 Ultrasonic Sensor
4. One White LED
5. One Yellow LED
6. Two 220-ohm resistors
7. Four crocodile clips
8. Eight Male/Male hookup wires
9. A breadboard
10. A box
11. A cardboard
12. A scissor
14. Some little toys for decoration
Step 2: Step 2: Connect the Components
Connect the components and wires as shown in the pictures.
First, plug the ultrasonic sensor into the breadboard, uses wires to connect VCC(show on the back of the ultrasonic sensor ) to +5V pin, Trig(show on the back of the ultrasonic sensor ) to Arduino pin 12. Echo to Arduino pin 13, GND to GND.
Second, plug the wires on the servomotor into the pin on the breadboard. The black wire is to GND pin, the red wire is to +5pin, the yellow wire is to pin 9.
Third, use the crocodile clips to connect the white and yellow LED to the breadboard. The shorter leg is connected to the GND pin and the longer leg is with the connect parallel 220-ohm resistors and white LED to pin 3 and Green LED to pin 2.
Fourth, connect the positive part on the breadboard to the +5V pin and the negative part to the GND.
Step 3: Step3: Decoration
First, design and plan what you want to decorate. Then, cut the cardboard into a fit size and cut a hole on the side of the box for the yellow LED light bulb and another hole on another side of the box for the wire to upload the sketch to the board.
Second, put the Arduino breadboard into the box, then put the yellow LED light bulb into the hole on the side of the box.
Third, put and stick all of the decoration onto the cardboard, and cut a hole on the cardboard to place the White LED light bulb.
Lastly, place the cardboard into the box, and put it above the Arduino breadboard.
Step 4: Step4: Upload the Sketch
Copy the sketch to your Arduino and enjoy your surprise box