Introduction: Neopixel (wearable) Belt

Parts needed:

Arduino Uno

Wires for connection

Adafruit Neopixel Strip

9V battery and connection

Step 1: Test Your Strip

First is to test your neopixel strip using the strand test found on the adafruit site.

Step 2: The Code !!

#include

#ifdef __AVR__ #include #endif

#define PIN 6

Adafruit_NeoPixel strip = Adafruit_NeoPixel(29, 6, NEO_GRB + NEO_KHZ800);

void setup() { // This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket #if defined (__AVR_ATtiny85__) if (F_CPU == 16000000) clock_prescale_set(clock_div_1); #endif // End of trinket special code strip.setBrightness(50);

strip.begin(); strip.show(); // Initialize all pixels to 'off' }

void loop() { // Some example procedures showing how to display to the pixels: colorWipe(strip.Color(255, 0, 0), 50); // Red colorWipe(strip.Color(0, 255, 0), 50); // Green colorWipe(strip.Color(0, 0, 255), 50); // Blue

// Send a theater pixel chase in... theaterChase(strip.Color(127, 127, 127), 50); // White theaterChase(strip.Color(127, 0, 0), 50); // Red theaterChase(strip.Color(0, 0, 127), 50); // Blue theaterChase(strip.Color(128,0,128), 50); //Purple

rainbow(20); rainbowCycle(20); theaterChaseRainbow(40); }

// Fill the dots one after the other with a color void colorWipe(uint32_t c, uint8_t wait) { for(uint16_t i=0; i

void rainbow(uint8_t wait) { uint16_t i, j;

for(j=0; j<256; j++) { for(i=0; i

void rainbowCycle(uint8_t wait) { uint16_t i, j;

for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel for(i=0; i< strip.numPixels(); i++) { strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255)); } strip.show(); delay(wait); } }

void theaterChase(uint32_t c, uint8_t wait) { for (int j=0; j<10; j++) { //do 10 cycles of chasing for (int q=0; q < 3; q++) { for (uint16_t i=0; i < strip.numPixels(); i=i+3) { strip.setPixelColor(i+q, c); //turn every third pixel on } strip.show();

delay(wait);

for (uint16_t i=0; i < strip.numPixels(); i=i+3) { strip.setPixelColor(i+q, 0); //turn every third pixel off } } } }

//Theatre-style crawling lights with rainbow effect void theaterChaseRainbow(uint8_t wait) { for (int j=0; j < 256; j++) { // cycle all 256 colors in the wheel for (int q=0; q < 3; q++) { for (uint16_t i=0; i < strip.numPixels(); i=i+3) { strip.setPixelColor(i+q, Wheel( (i+j) % 255)); //turn every third pixel on } strip.show();

delay(wait);

for (uint16_t i=0; i < strip.numPixels(); i=i+3) { strip.setPixelColor(i+q, 0); //turn every third pixel off } } } }

uint32_t Wheel(byte WheelPos) { WheelPos = 255 - WheelPos; if(WheelPos < 85) { return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3); } if(WheelPos < 170) { WheelPos -= 85; return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3); } WheelPos -= 170; return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }

Step 3: Who Doesn't Love a Good Narrative?

The funny thing about plans is that they are always changing. For my final I arrived at the idea of a wearable set of LED's that could be used for many different things but campus safety is what stood out to me the most.

The University of West Florida actually has an escort service who you can call during the day or at night to escort you from areas that you may not feel as safe to your car or a safe area. These escorts are only identifiable by a black walky talky and the florescent vest thats extremely cheap and flimsy.

For my LED's I wanted to make them a belt they could wear and they would be way more identifiable in a custom way. The Adafruit LED's can be coded to have a single color flash depending on the type of emergency the person who called has and a switch can easily be added to sort through these colors. I strapped the LEDs to a sturdy belt that I had and tinkered with how to place the circuitry. After, hours of design an mediating with myself I was happy with my prototype. I want to take the idea further and have the LEDs in the form of a sash, like the hall monitors in the 90's movies, I think that would be even better!

Comments

author
wold630 made it! (author)2016-04-27

I love these wearable projects!

About This Instructable

373views

9favorites

License:

More by DeexJae:Neopixel (wearable) belt
Add instructable to: