16
© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University LilyPad – Scarf You will need: 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:

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

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

LilyPad – Scarf

You will need:

• 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:

Page 2: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

2. Next, lay your scarf on the ground and fold it in half width wise:

3. Now hold your scarf up so that your scarf is being held in the middle at the very halfway point:

Page 3: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

4. Wrap the scarf around your neck and place the open ends through the loop on the opposite end. This will wrap your scarf like a slip knot:

Page 4: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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:

Page 5: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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.

Page 6: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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.

Page 7: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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:

Page 8: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

11. Thread you r needle and knot the end a second time. This time sew through pin 7 to secure your LilyPad down:

12. Now, start new again by sewing through pin 12 and sew towards the LED closest to the LilyPad:

Page 9: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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:

Page 10: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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:

Page 11: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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.

Page 12: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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:

Page 13: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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

void setup() {

Page 14: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

// declare pin 9 and 12 to be an output

pinMode(9, OUTPUT); pinMode (12, OUTPUT);

}

void loop() {

// set the brightness of pin 9:

analogWrite(9, brightness); digitalWrite (12, LOW); //set pin 12 as off/ground

// change the brightness for next time through the loop:

brightness = brightness + fadeAmount;

// reverse the direction of the fading at the ends of the fade:

if (brightness == 0 || brightness == 255) { fadeAmount = -fadeAmount ;

}

delay(30); // wait for 30 milliseconds to see the dimming effect

}

Page 15: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

Your screen should look something like this when you are paste it (notice some code is in orange, blue and some black):

24. Now click the play button to make sure your code compiles with no errors:

If there are no errors with your code, you will get a message at the bottom of your screen that looks like this (no error messages in red):

Page 16: 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

© 2012 Institute for Teaching through Technology & Innovative Practices of Longwood University

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: