Since Mother's Day is in those few days:
We should be ready to give our mothers what leads her to know how much we love them. All the traditional ideas are those such as buying her gifts like kitchen tools, cloths, house instruments, etc. So we don’t typically make anything special for that day. Here is a special box that opens itself. Inside is a rotating mobile and LEDs, which can be positioned as whatever we want to write, draw or say when lit. After that, music will be turned on from the mobile. Finally, the camera flash will be opened and take a photo and then upload it on twitter with a caption "happy mothers' day". In that video, I used the laptop as a power supply for the Arduino, so you can use a 5V battery connected the the Arduino.
- Arduino UNO
- 1Sheeld
- Servo motor
- 11 Red LEDs
- Breadboard
Follow this tutorial for how to 1Sheeld with Arduino: https://1sheeld.com/tutorials/getting-started/
The Servo MotorServo motor has 3 pins:
- VCC, which is the red one, is connected to the 5V pin.
- GND, which is the black and brown one, is connected to the GND of the Arduino.
- Signal pin, which is the yellow one, is connected to any digital pin of the Arduino - here I have connected it to pin 9.
I chose red LEDs for the event. It's easy to connect the LEDs to the Arduino. The positive terminals of then are connected to digital pins 13, 12, 11, 10, 8, 7, 6, 5, 4, 3 and 2. And the negative terminals of them are connected to common GND on the breadboard.That’s easy to assemble, as we see:
Let's imagine what we want to do to determine the shields we need in our project. Here we want the box to be opened by rotating the mobile phone in the direction of the X-axis.
Then the LEDs, which are positioned as whatever we want to write, draw or say, will light, music will play from the mobile, and finally the camera flash will open, taking a photo and uploading it to twitter with a caption "happy mothers' day". So when we decide what we want to do, it becomes easy.
The BoxThe box I used is made from carton and was covered. The trick that makes it open is not only the servo motor, but there's a hidden knob behind the box which is tied to the upper surface of the box and attached to the back side.
And I bought a small piece of metal and fixed it on the servo blades using wax.
This is the code:
And here is the PDF of the project: http://www.mediafire.com/file/7txu86ikc591zuu/project.pdf
And here's another video:
Comments