SparkFun will be closed Nov 26th and 27th for the Thanksgiving holiday. Orders placed after 2:00pm MT on the 25th will ship out Monday the 30th.
This is a quick tutorial to get you started sewing a simple LEDs-only circuit using the LilyPad Arduino Simple Board. You won't learn how to create your own Arduino program, but you'll hook 9 LEDs to the board (one to every pin except + and -), and you'll upload provided code to change the way the lights move and blink.
The supplies you'll need are as follows:
Recommended, but not necessary:
Go ahead and visit http://arduino.cc/en/Main/Software to download the Arduino software if you don't already have it. It's free, and it is fairly straightforward, but if you get all of your sewing done and then have to stop and install software before you can see if it works, that will be frustrating! Follow the installation guides found here : http://arduino.cc/en/Guide/HomePage and when you're ready to install your FTDI drivers, make sure you follow the 'Arduino Duemilanove' driver installation guide. Once everything is set up and you can open Arduino, we're good to start sewing!
Take a look at your simple board- it has 11 pads on it that can be sewn to any number of interesting devices. In this tutorial, we're just going to handle lights, but remember that the Arduino board is a really versatile tool. It can be used to direct the activity of sensors, motors, buzzers, vibration motors- anything you can buy on a LilyPad board, and plenty of things you can't. We're using 9 LED light boards because you've got nine pads on the board aside from the + and - pads.
Go ahead and thread your needle with conductive thread, and sew your simple board down to the fabric where you want it by the hole in the pad labeled '5'.
Sew away from this point to where you want your first LED to go, then sew down the positive pad of the LED
Tie off and cut your thread, restarting on the next pad you'd like to sew down. I find it easier to move to the other side of the board, so that it's securely attached on both sides. Sew from this one to where you'd like the corresponding LED, and once again sew down the positive side of the LED.
Repeat this process for every pad except for the ones labeled + and -. I've sewn mine in a radial pattern - you can deviate from this pattern, but remember not to cross any of the strands. Since conductive thread is uninsulated, if the lines of stitching cross, two LEDs will receive the current meant for only one.
You have two pads left now.
Sew down the - pad, called 'ground' and stitch from it to the "-" on the nearest LED. You don't have to knot and cut this line of stitching - continue it to the next LED, and the next, all the way around to the last LED, making sure never to cross a "+" trace with this "-" trace.
When you get to the last LED, go ahead and knot the thread and cut it. You should now have all 9 LEDs connected to individual pads on the Arduino board on their positive sides, and all of them connected in one contiguous line to each other and to the ground pad.
Here is what the circuit looks like from the back - you can see that none of the positive traces are in contact with each other, and all of the negative ones are.
You're done now with the sewing portion - the circuit is complete. Connect the FTDI board to the headers on the Lilypad Arduino board and the mini-usb end of your cable to the FTDI board like so:
And the USB end of the cable into your computer
Next, you'll upload the program. If you haven't installed Arduino on your computer yet, you'll need to do it now. When you open Arduino, you'll get a screen like this:
Double check that you've selected the correct board-
Now it's time to upload the code that will run your lights!
This is the code you'll use:
Cut and paste that code, in its entirety, into the Arduino sketch window, then click the upload button.
And take a look at the black box at the bottom.
If you've got a red error message, check your com port. You can do this by opening up this menu and unplugging the cord that connects the computer to the FTDI board from the computer's USB port. Look at which COM port disappears, then plug the USB back into the computer and select that port.
Barring errors, you should now have all nine lights participating in a quick, fading twinkle effect. Go ahead and unplug the FTDI board from the Arduino board, plug in your battery, and turn the switch on to check it out. I used this circuit to create this glimmering cocktail dress, but you can apply this circuit to anything you'd like - feel free to use your creativity!