Neopixel Hats

There are some fun wearable projects that you can do with small Arduino modules like the Gemma ($9) and some neopixels. ($7).

 

Conductive thread is used to both secure the modules to the material and to do the wiring.

For this project we wanted to have a sequence of colour patterns, so we had:

  • a rainbow moving around in a circle
  • a red smiley face, that had a left/right smirk and then a wink
  • a rainbow moving around in a circle
  • a red smiley face, that had a left/right smirk and then a wink

However there a tons of possible patterns that could be used.

For the battery mounting there are a few options such as lipo batteries, coin batteries and small battery packs.

Below is some example code for the moving rainbow that we used.

Have Fun

#include <Adafruit_NeoPixel.h>

#define PIN 1
int theLED = 0;


Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();
  strip.setBrightness(20);
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {
  // Create a rainbow of colors that moves in a circle 

  int col;
  
     for (int i=0; i < strip.numPixels(); i++) {
        strip.setPixelColor(i, 0, 0, 255);
     }
    theLED = theLED + 1;
    if (theLED >= strip.numPixels()) {
      theLED = 0; 
    }
    strip.setPixelColor(theLED, 209, 31, 141);
    strip.setPixelColor(theLED - 1, 11, 214, 180);
    strip.setPixelColor(theLED - 2, 240, 210, 127);
    strip.setPixelColor(theLED - 3, 191, 127, 240);
    strip.show();
    delay (500);
}

2 thoughts on “Neopixel Hats

Leave a comment