LED strips in T-Shirt

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
isdale
 
Posts: 80
Joined: Wed Dec 15, 2010 12:54 am

LED strips in T-Shirt

Post by isdale »

I wore this LED T-Shirt under nice white shirt to teach the class at Hawaii STEM Conference.

It is an 8x10 array of individually addressable LEDs (HL1606 strip from +Adafruit Industries ) driven by PJRC Teensy 2.0 and 4 D-cell batteries, with a Pololu Step-Down Voltage Regulator D15V70F5S3 to keep it at 5vdc. Current code is the Basic Pattern sketch from example lib, with mod from AdaVision's Processing script to deal with zig-zag wiring. The PWM lib mod works too, but there were more examples for this. Adding other effects (like a beating heart, or other animations) is simple matter of programming. Comms & sensors would be cool too... someday.
LED T-Shirt running Rainbow Party
LED T-Shirt running Rainbow Party
LED T-Shirt Rainbow Party tiny.jpg (51.52 KiB) Viewed 3589 times
Inside T-Shirt
Inside T-Shirt
LED T-shirt insde tiny.jpg (32.34 KiB) Viewed 3589 times
T-Shirt electronics
T-Shirt electronics
LED T-Shirt Electronics tiny.jpg (40.71 KiB) Viewed 3589 times

User avatar
isdale
 
Posts: 80
Joined: Wed Dec 15, 2010 12:54 am

Re: LED strips in T-Shirt

Post by isdale »

Code for this was created from mashup of the HL1606 library and WS2801.java from AdaVision. I renamed the HL1606 to HL1606Matrix and added in a setZigZag() from WS2801. Code bases have different licenses so I'm not sure best way to release any code.

The original ZigZag code uses an array to map from the linear led index into a Pixel vector representing the matrix. I needed to map the other way. Rather than hurt my brain trying to figure out the math (at 2am the day before I was going to wear it), I did a quick hack - use the original WS2801 code to create mapping, use that to fill leds[] that maps the led idx, then copy that over the matrix map. Lastly it zeros out the leds[] again...

Code: Select all

   for (i = 0; i < _numLEDs; i++)
   { 
     _leds[_remapMatrix[i]] = i;
   }
   for (i = 0; i < _numLEDs; i++)
   { 
     _remapMatrix[i] = _leds[i];
   }
   for (i = 0; i < _numLEDs; i++)
   { 
     _leds[i] = 0;
   }
One oddity in development - Originally, the setZigZag() did the malloc() for the remapMatrx[], but this gave me compiler errors from Arduino IDE. Moving the malloc() to the object creation method removed the error, at cost of forcing dual array creation.. not really an issue since anyone not wanting it should really be using the straight HL1606 library.

Thanks Phillip for the adavision and HL1606 code.

User avatar
isdale
 
Posts: 80
Joined: Wed Dec 15, 2010 12:54 am

Re: LED strips in T-Shirt

Post by isdale »

I just posted a full writeup on the T-Shirt and the STEM Conf class on the MauiMakers blog At some point I'd like to clear up licensing and release the code.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”