Step 8: Program your jacket

Picture of program your jacket
Decide on the behavior you want.

I wanted the left switch to turn on the left turn signal for 15 seconds or so, and the right switch to do the same thing for the right signal. Pressing a switch when the corresponding turn signal is on should turn the signal off. Pressing both switches at the same time should put the jacket into nighttime flashing mode. The wrist mounted LEDs should provide feedback about the current state of the jacket. Here's the code I wrote to get that behavior.

Program your jacket

To program your garment, copy and paste my code into an Arduino window and load it onto the LilyPad. You may have to make some small adjustments first depending on where you attached lights and switches. Play with delays to customize your blinking patterns. Follow my LilyPad introduction instructions if you need more information on how to program the LilyPad or how to make sense of my code.

Plug your battery back in and see if it works and...go biking!

Insulate the rest of your traces

Cover the rest of your traces with puffy fabric paint. Again, don't coat anything until you're sure it works.

About washing

Your creation is washable. Remove the battery and wash the garment by hand with a gentle detergent.

Note: silver coated threads will corrode over time and their resistance will gradually increase with washing and wear. To limit the effects of corrosion, insulate and protect your traces with puffy fabric paint or some other insulator. You can also revive exposed corroded traces with silver polish. Try this on a non-visible area first to see what it does to your fabric!
tnjiti2 years ago
I was not able to get the code for the behavior...can u kindly post it ?


da832 years ago
thanks for the project
Very nice project, will it operate while rain soaked?
ShortedOut5 years ago

Leah, are you still answering questions from your Instructables? I have seen many links out on the Internet, as well as the ones on this page, that are links to your University of Colorado Computer Science area. The pages you are linking to have apparently been removed from that site, which gives a Page Not Found message. Therefore, the code used to program this turn signal biking jacket is no longer available. For those people for whom this could well be a first project, the fact that there is no code available puts a damper on making a purchase of LilyPad products. Could the code be posted on this page, or is it too long? Thanks. I'll also send a message through the SparkFun site.

blurofred5 years ago
What is your estimated cost for everything?
Muratas6 years ago
Creative, Great Idea
Wankaah6 years ago
May I ask, do you feel the lilly pad on the other side? can you email me at t-g-l.crackelin.cracka@hotmail.com :) this is exiting
Default1176 years ago
Haha. You look like Iron Man in the last picture.