Introduction: If This Than That - Light-up Butterfree
Hi! Today I am going to show how I made my little light-up Butterfree. You can put him down and if you come too close he will notice you! You can also make a game out of it; set him upright without him noticing you with his light!
What we gonna need is:
Supplies
- An Arduino UNO
- 4 resistors
- 4 LEDS
- Ultrasonic distance sensor
- a lot of coloured wires
- supplies to solder such as tin
- purple felt/fabric
- blue felt/fabric
- white felt/fabric
- plush filling
- a black marker or paint
- red paper
- craft foam and or regular/EVA foam
- some sort of rope
- scissors
- second glue
- a needle and thread
- A powerbank
(Optional = A sewing machine)
Step 1: Base
This is the base!
Add the following code;
<p>#include <newping.h><br></newping.h></p><p>long duration, distance;</p><p>void setup() { // put your setup code here, to run once:</p><p> Serial.begin(9600);</p><p> pinMode(10, INPUT); pinMode(11, OUTPUT); pinMode(12, OUTPUT); pinMode(7, OUTPUT); pinMode(6, OUTPUT); pinMode(13, OUTPUT);</p><p>}</p><p>void loop() { // put your main code here, to run repeatedly:</p><p> digitalWrite(11, LOW); delayMicroseconds(5); digitalWrite(11, HIGH); delayMicroseconds(10); digitalWrite(11, LOW);</p><p> pinMode(10, INPUT); duration = pulseIn(10, HIGH);</p><p> if (distance < 10) {</p><p> digitalWrite(12, HIGH); digitalWrite(7, HIGH); digitalWrite(13, HIGH); digitalWrite(6, HIGH);</p><p> //all leds are on</p><p> } else if ((distance < 20)&&(distance > 10)) { digitalWrite(12, HIGH); digitalWrite(7, HIGH); digitalWrite(13, LOW); digitalWrite(6, LOW);</p><p>//only the red leds are on</p><p> } else { digitalWrite(12, LOW); digitalWrite(7, LOW); digitalWrite(13, LOW); digitalWrite(6, LOW);</p><p>// all leds are off</p><p> }</p><p> distance = (duration/2) / 29.1;</p><p>Serial.print(distance); Serial.println();</p><p>delay(700); }</p>
Step 2: Solder All Parts Together on the Board!
Make sure to colorcode all wires which I unfortunately failed to do properly. It worked out for me luckily!
Step 3: Cut Circles As Base for the Eyes and Mouth
Grab the foam and cut them! Also cut the red paper. Eyeball the shapes using a butterfree reference.
Step 4: Cut Holes in the Foam Shapes!
Cut small holes in them so you can fit the foam around the lamps and sensor. Glue the red paper on the eyeshapes and cut the holes in those too.
Step 5: Put the Shapes On!
They should fit! reinforce them with the glue.
Step 6: Make a Foam Base Underneath the Board
Glue em on! eyeball it, I made it big enough for my cable. I cut a hole on one side and pulled the cable through.
Step 7: Strips of Foam for the Head Base!
Once again, eyeball the shape. Glue them on like a + sign. Add more strips where you think it is needed for support.
Step 8: Felt Base Let's Go!
Cut out 4 panels shaped like in the picture. The straight sides will be sewn together so it shapes a circle; a ball for the head.
Step 9: More Felt!
You made a circle the previous step. Now you sew on big stripes on the end so you can form the body later on. Leave the backstrip open so you can turn it inside out.
Step 10: Inside Out + Put It in + Fill Up!
Now comes the toughest part. You turn the whole thing inside out. You left one side open right? Here you carefully put in the arduino and the foam base. Pull the felt around. Cut open where the eyes are and glue the felt to the paper. Also cut it open where the sensor is. Handsew a part of the back shut, but not completely! we need an open part for the powerbank to be easily removable to be recharged.
Step 11: Details!
Fill up more where it is needed and add a little mouth! glue it around the sensor, but don't let it touch. :)
Step 12: More Details!
Add the little fangs and antennas! It is also important to test if the lamps still work!
Step 13: Feet and Hands!
Eyeball it once again, cut 2 for each hand, and 2 for each feet. (8 total) Sew them together and turn them inside out!
Step 14: Sew Them On! + Wings
Handsew the hand and feet. Pattern the wings with regular paper. Just draw it on. Cut the wings out 4 times. Sew them together, turn inside out, fill them and sew the wings together.
Step 15: Wing Pattern!
Draw them on both sides
Step 16: Sew Wings On
Handsew them at the top only! At the bottom use either velcro or buttons to close the butterfree properly.
Step 17: Enjoy!
Have fun with your little fella. :)