LilyPad – Scarf LilyPad main board LilyPad FDTI Basic ... Projects/LilyPad Tutorial… · 1. Cutout the LilyPad printouts (1 & 2) that correspond to the parts you will be using
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
• Scarf • LilyPad main board • LilyPad FDTI Basic Breakout board • mini USB cable • Coin Cell Battery Holder • LilyPad LEDs (4 yellow) • Conductive thread • LilyPad printouts 1 (board and battery) • LilyPad printouts 2 (LEDs) • Sewing needle • Fabric glue • Coin cell battery • a pair of scissors or a seam ripper • puffy fabric paint • push pins • ruler or cloth measuring tape • a fabric marker or piece of chalk (optional)
1. Cutout the LilyPad printouts (1 & 2) that correspond to the parts you will be using in your design (LilyPad Arduino board, 4 LEDs). There is not a cutout for the coin cell battery holder, so cut out a piece of paper approximate in size:
5. Now that you know how your scarf will lay when folded, find the inside of the looped side and place the LilyPad cutout on the inside of the folded fabric where it will not be seen when worn. Fasten it with a push pin:
6. Take the one of the LED cutouts and a push pin. Attach it to the inside of your scarf at the top towards your neck. Make sure to place it under the layers of fabric so that the LED itself will not be visible when the scarf is worn. Only the light that it emits will be visible:
7. Take the other 3 LED cutouts and attach them with pushpins in a pattern towards the end of your scarf. Again, place them under the folded layers of the scarf:
Note: Remove the scarf from your neck when you are done attaching the LED cutouts and place it back on the ground for you to work with and complete your layout.
8. With your scarf laid out, attach your piece of paper that is size of your cell battery holder with a push pin not too far from your LilyPad:
I used a measuring tape to pin it approximately 6” away from the LilyPad. Close enough so that it would still be hidden when worn, but far enough away so they would not touch when worn.
Note: Your LED cutouts should be attached to the opposite side of your battery holder and LilyPad.
9. Cut a length o f conductive thread (about 1 foot in length). Thread a sewing needle with it and knot the end:
Remove the excess end past the knot with a seam ripper or small pair of scissors.
10. Start by sewing down the LilyPad where your paper version is pinned down. Use an unneeded pin, such as pin a2. Sew through the pin and scarf several times before knotting the end and cutting off the remaining thread:
13. Once you get to the place where the first LED is going to go, sew through the negative pin several times:
14. Continue sewing towards the other LEDs and secure them down through the negative pins until all your LEDs are connected with the conductive thread through the negative pins. Once you get to the last pin/LED, sew through some of the existing thread, knot the end and cut off the excess thread:
15. Repeat the same actions but use pin 9 on the LilyPad and sew through all the positive pins on the LEDs:
16. Now it’s time to sew down the power source. Place the cell battery holder down on your fabric with the opening facing away from your LilyPad. Sew through the positive pin furthest away from your LilyPad. When you have sewn through that pin as many times as you can, sew underneath the fabric to and through the second positive pin. Now sew towards and through the positive pin on your LilyPad. Knot and end this stitch away from the LilyPad:
17. Now sew down the negative pin furthest away from the LilyPad. Sew around the cell battery holder and into the second negative pin. Then sew towards and through the negative pin on your LilyPad:
Note: The top part of the cell battery holder has a positive charge. This is why you need to sew away from the holder and then into the second negative pin. If your conductive thread was to touch the cell battery holder (other than in the pins), it would cause your circuit to short.
18. Next, put fabric glue on all your knotted ends:
Note: You will need to do this on both sides of the scarf. Be sure to do this on a surface there that can be easily cleaned (glass). Some of the glue might go through you r fabric when you are doing this, so also make sure it doesn’t stick to that surface by checking it sporadically.
19. After your glue has dried, you are ready to load the code onto your LilyPad. Connect the mini USB cable and the LilyPad FDTI Basic Breakout board together using the small end of the USB cable:
Connect the other end of the USB cable to a USB port on your computer.
20. Connect the LilyPad FDTI Basic Breakout board to your LilyPad Arduino board:
21. Launch the Arduino software on your computer. Go to Tools option in your Arduino software. Select Serial Port, than select the highest port number (mine was COM6):
22. Go to Tools again. This time select Board, then LilyPad Arduino w/ATmega328:
23. Copy and paste the following programming code to create a sketch for your design:
/* Fade
This example shows how to fade an LED on pin 9 using the analogWrite() function.
*/
int brightness = 0; // how bright the LED is int fadeAmount = 5; // how many points to fade the LED by
25. You are now ready to upload your code to your LilyPad by clicking the Upload button:
You will see several lights flashing on both your Arduino LilyPad and the LilyPad FDTI Basic Breakout board.
26. Next, unplug the LilyPad FDTI Basic Breakout board from your LilyPad and place a cell battery in your battery holder:
Watch you LEDs fade in and out!
27. As a finishing touch to your scarf, add fabric puff paint on your conductive threads (both front and back). This will help avoid any of the threads touching while wearing it and shorting the circuits causing the lights not to work: