.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!