Take one Lilypad LED-matrix top (you thought I'd forgotten, hadn't you?), add one SparkFun Wearable Keypad, and voila! You get one fun interactive top!

But first, last I left you I was testing out the keypad with an Arduino. I had to use female jump-leads to hook onto the wires from the keypad, and then male jump-leads to connect them to the Arduino. Messy, but it worked.

It wouldn't, however, work with the Lilypad. So I came up with an idea similar to the one I'd had for adding a 3.5mm stereo audio-jack into a project; making use of the Lilypad small Prototype Board. I'd simply solder female headers onto the prototype board. ... Now, I'll leave it up to you to decide whether it's by design or coincidence, but the prototype boards are five holes wide. Five being the number of active wires on the keypad. Hmm... When you cut the breakaway headers you will lose at least one of the pins, so don't try to cut too closely to the fifth pin, or you could end up losing two.

As usual, you need to break the connections on the prototype board you don't want. (Initially all traces connect to everything else.) It's best to plan this out, and to know what each of the sew-holes will correspond to.

Then solder it together, leaving the headers at an angle so you can still reach the sew-holes with a needle.

While testing this interface I got annoyed at the wires of the keypad. They are tiny, frail stranded copper wire, and break very easily. Eventually I got so annoyed I went out and bought solid-core wire and soldered this to each of the active wires. (Sealed with heat-shrink.) The stripped solid-core wire acts much like a male jump-lead, making it much less frustrating to connect and disconnect repeatedly.

I tested, and reprogrammed the new physical layout (I'd had to remove the battery holder and move the push button). And was left with this. (Note: the battery has yet to be permanently added, I'm connecting it with crocodile clips at the moment.)

So there you go. I then spent quite some time programming it. You see, I figure most of the fun of having a programmable shirt is being able to change the display and patterns at whim, not just being stuck with what you've soldered in place. As such I've set up the keypad to be able to 'draw' patterns on the shirt. You can then pull out the keypad, and as long as you don't turn off the battery, the Lilypad will remember it as you cycle through the other patterns, all night.

It's all controlled by the push-button. Initially all LEDs are off.
- Push once; all LEDs are on.
- Push twice; you get the random LED twinkle pattern.
- Push thrice; you get into keypad controllable mode (denoted by the keypad lighting up). You press the centre SparkFun-logo button to clear the board and pick a random starting LED. Then you can use the four directions to draw in lights.
- If you press the push-button a fourth time, you stay in the keypad mode, but the timing changes and the pattern becomes a chase-sequence.
- Pressing the push-button again brings you back to the beginning, with all LEDs off. (But so long as you don't turn off the battery, your pattern is still kept in memory.) Here, have a look.

If you happen to be at Darklight next weekend, come find the tog guys, and you can have a go yourself :)
Date/Time: 2014-01-28 18:04 (UTC)Posted by: (Anonymous)
This is a great piece! You have way more skill and patience for sewing than I do. My light suit (http://antholume.com) also has a 7x7 array of LEDs on the front and back, and I have an Android phone app I can use to scroll text across those parts of the suit. It's so big that the letters are really only discernible from considerable distance. But fun anyway.

Keep up the great work!