HelloKitty and Pochacco Dancing on the Gift
by zoechang in Living > Toys & Games
155 Views, 1 Favorites, 0 Comments
HelloKitty and Pochacco Dancing on the Gift
Kitty and Pochacco Dancing on the Gift is make by arduino! It is perfectly to be a gift suitable for someone birthday!!! When someone blow on candle, both of the cute dolls will start to dancing around. It is very special, if you don't know what are you going to buy the birthday present to your best friend, you can choose to use try to DIY "Kitty and Pochacco Dancing on the Birthday Cake" by yourself! It will be so sweet and so special compare with other gifts!
Supplies
- A cute HelloKitty doll and the Pechacco doll
- A pretty present box
- A paper board
- Tools
- A scissor
- A knife
- A glue
- A tape
- A pen
- Arduino's Material
- Acoustic Chip
- Rotational Motor
- MEGA Arduino Board
- Breadboard
- LED Light
- Resister
- Wires
Cut the Hole on the Present Box
Cut the hole on the top of the present box of two different size. It is use to make the Resister(candle) and the Rotational Motor(dancing machine) go out of the box.
Connect Wire on Board
Connect all of the wires on the board such like the picture based on the text.
Programing Code [with Explanation]
https://docs.google.com/document/d/10QqqHScX1B4dM0h8gLH98AzZBGfuKBMqy-2rtPGPEEc/mobilebasic
#include //使用servo函數的宣告Servo myservo; //伺服馬達叫myservoint pos = 0; //設立一個數值叫pos 啟始點為0void setup() { Serial.begin(9600); //使用序列埠,鮑率為9600 pinMode(8,OUTPUT); //這裡設定所要輸出的PIN腳模式 myservo.attach(9); //將 Servo 物件指定到一輸出腳位上。呼叫此函式後,指定腳位上的電壓將初始化為 LOW myservo.write(180); //叫Servo 旋轉到180度}void loop() { int sensorValue = analogRead(A0);//程式上傳到 Arduino 後,打開 Arduino Software(IDE) 的 Serial Monitor 功能,可看到 Arduino 讀 到類比輸入的讀值,只要手動調整電位計,讀值也隨之變化,即時的傳到 Serial Monitor Serial.println(sensorValue); //Serial Monitor 會呈現感應器的數值 if(sensorValue > 50){ //當音量超過一定數值,這個數值依個別情況修改 digitalWrite(8,HIGH); //燈亮 for (pos = 0; pos <= 180; pos += 1) { // 從0到180度 // 一個一個加上去 myservo.write(pos); // 告訴伺服馬達要轉到"pos"這個數值 delay(15); // 等個 15ms } for (pos = 180; pos >= 0; pos -= 1) {// 從0到180度 // 一個一個減去 myservo.write(pos); // 告訴伺服馬達要轉到"pos"這個數值 delay(15); // 等個 15ms } }else{ digitalWrite(8,LOW); //燈滅 myservo.write(90); //轉道90度 } delay(100); // 等個 100ms}
Stable the Breadboard Inside of the Present Box
Use tape to stable the breadboard, acoustic chip, and rotational motor on the inside of the cover of the present box.
Connect!
Connect the USB cable with power bank and acoustic chip. Connect Success!
Final Present Video!!!
Congrats!