Light-up Neopixel Jockstrap

The Light-up LED Jockstrap is an exploration of fetish wear meets NYC party life.  Its sure to make you stand out in a crowd of sweaty half naked men and grab the attention of whoever is going to grab you.

2013-08-13-ModusVivendiFurJockstrap06 +WEB%20IMG_3361_0=

Final

Its Construction:

The light-up LED Jockstrap is made of a hand sewn elastic and lycra jock strap that was then fitted with an Adafruit Flora board and an an accelerometer that controls the two neopixel strips that either light up continuously  or fire off random bursts of pixels.

Jock Strap materials

Process3

Process4

Process 2

The Codes:

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_LSM303.h>
#include <Adafruit_NeoPixel.h>

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_RGB Pixels are wired for RGB bitstream
// NEO_GRB Pixels are wired for GRB bitstream
// NEO_KHZ400 400 KHz bitstream (e.g. FLORA pixels)
// NEO_KHZ800 800 KHz bitstream (e.g. High Density LED strip)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(50, 6, NEO_GRB + NEO_KHZ800);
Adafruit_LSM303_Accel accel = Adafruit_LSM303_Accel(54321);

// Here is where you can put in your favorite colors that will appear!
// just add new {nnn, nnn, nnn}, lines. They will be picked out randomly
// R G B
uint8_t myFavoriteColors[][3] = {{0, 0, 200}, // purple
{200, 200, 200}, // red
{0, 200, 0}, // white
};
// don’t edit the line below
#define FAVCOLORS sizeof(myFavoriteColors) / 3

// mess with this number to adjust TWINklitude 🙂
// lower number = more sensitive
#define MOVE_THRESHOLD 3

void setup()
{
Serial.begin(9600);

// Try to initialise and warn if we couldn’t detect the chip
if (!accel.begin())
{
Serial.println(“Oops … unable to initialize the LSM303. Check your wiring!”);
while (1);
}
strip.begin();
strip.show(); // Initialize all pixels to ‘off’
}

void loop()
{
/* Get a new sensor event */
sensors_event_t event;
accel.getEvent(&event);
Serial.print(“Accel X: “); Serial.print(event.acceleration.x); Serial.print(” “);
Serial.print(“Y: “); Serial.print(event.acceleration.y); Serial.print(” “);
Serial.print(“Z: “); Serial.print(event.acceleration.z); Serial.print(” “);

// Get the magnitude (length) of the 3 axis vector
// http://en.wikipedia.org/wiki/Euclidean_vector#Length
double storedVector = event.acceleration.x*event.acceleration.x;
storedVector += event.acceleration.y*event.acceleration.y;
storedVector += event.acceleration.z*event.acceleration.z;
storedVector = sqrt(storedVector);
Serial.print(“Len: “); Serial.println(storedVector);

// wait a bit
delay(100);

// get new data!
accel.getEvent(&event);
double newVector = event.acceleration.x*event.acceleration.x;
newVector += event.acceleration.y*event.acceleration.y;
newVector += event.acceleration.z*event.acceleration.z;
newVector = sqrt(newVector);
Serial.print(“New Len: “); Serial.println(newVector);

// are we moving
if (abs(newVector – storedVector) > MOVE_THRESHOLD) {
Serial.println(“Twinkle!”);
flashRandom(7, 7); // first number is ‘wait’ delay, shorter num == shorter twinkle
flashRandom(5, 50); // second number is how many neopixels to simultaneously light up
flashRandom(1, 19);
}

}

void flashRandom(int wait, uint8_t howmany) {

for(uint16_t i=0; i<howmany; i++) {
// pick a random favorite color!
int c = random(FAVCOLORS);
int red = myFavoriteColors[c][0];
int green = myFavoriteColors[c][1];
int blue = myFavoriteColors[c][2];

// get a random pixel from the list
int j = random(strip.numPixels());
//Serial.print(“Lighting up “); Serial.println(j);

// now we will ‘fade’ it in 5 steps
for (int x=0; x < 5; x++) {
int r = red * (x+1); r /= 5;
int g = green * (x+1); g /= 5;
int b = blue * (x+1); b /= 5;

strip.setPixelColor(j, strip.Color(r, g, b));
strip.show();
delay(wait);
}
// & fade out in 5 steps
for (int x=5; x >= 0; x–) {
int r = red * x; r /= 5;
int g = green * x; g /= 5;
int b = blue * x; b /= 5;

strip.setPixelColor(j, strip.Color(r, g, b));
strip.show();
delay(wait);
}
}
// LEDs will be off when done (they are faded to 0)
}

The final product and video:

http://www.youtube.com/watch?v=39rctb7HE7w&feature=youtu.beDSC_0274DSC_0285DSC_0177 DSC_0184DSC_0287 

So take off all your clothes, and put on a Light-up Jockstrap and go dance all night!

Author: Heath Wagoner

Most of the times I make jewelery or food, sometimes I just make a mess. Kale enthusiast.