Crypt Cat – Halloween Final

P2290597 2_edited_1920

Hi guys!

I think we can all call Halloween a success this year! Despite some mid-project set backs, I was able to pull together a satisfying compromise to my original Light up costume plan. Chc

Materials:

  • 6 RGB Neopixel LEDs
  • 1 Gemma Sewable Microcontroller
  • 1 AAA 3-battery pack
  • Styrofoam
  • Black mesh
  • Black Felt
  • Black “Satin” Fabric
  • Two Tone Sequin Fabric

Initial proposal:

My initial proposal for the light up, LED component of my halloween costume was to solder two identical circuits, that would display simultaneous code, and place them glowing from the shaped hears on the cat hood.

However, the soldering of the Neopixels was a very intricate task and harder then I had expected. With time limitation on my weekend I decided to adjust my end plans for a single 6 LED’s circuit and create a spooky glowing neck pendant for the Crypt Cat.

IMG_0599_1920

I cut a shape to curve around my neck out of black poly satin and then shaped a piece of styrofoam into a triangular, gem shape. I covered the styrofoam in two layer of black mesh to help in the diffusion process, for overall color and to help attached the foam to the main black piecing. I then sewed the circuit to the back of the styrofoam piece as a means of diffusing the light and creating an overall glow.

I stitch a pocket to the back solder piece that the battery pack and Gemma would sit in. As I was working on it the soldering snapped so I ended up also reinforcing the integrity of the circuit by sewing the wires to the main fabric.

IMG_0552_1920IMG_0562

I really wanted to play around with coding the sequence of LED’s for this project as I feel a bit unsure about code/writing code still and thought it would be good practice. I wanted to have the pendant glow, like a heartbeat, and transition colors as it pulsed in and out. For this, assigned specific RGB values to integers and then created a function using, set.brightness, that I could pull into the main loop and insert the RGB value into.

The other component I wanted to include is what I’m calling “Snake,” where the LED’s light up one at a time in succession. This was way more complicated for me and with some help, I learned in theory how it works although this one is still a bit of a comprehension challenge for me.

Either way, it’s be a fun a challenging project for me! Below you can find my code, and a video and more pics.

IMG_0601_1920IMG_0484_edited_1920


#include

#define PIN 1

#define NUM_LEDS 6

#define BRIGHTNESS 50

// 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, correct if colors are swapped upon testing
// NEO_RGBW Pixels are wired for RGBW bitstream
// NEO_KHZ400 400 KHz bitstream (e.g. FLORA pixels)
// NEO_KHZ800 800 KHz bitstream (e.g. High Density LED strip), correct for neopixel stick
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);

uint32_t Gold = strip.Color(255,206,0);
uint32_t Turq = strip.Color(41,196,204);
uint32_t Green = strip.Color(22,142,42);
uint32_t White = strip.Color(75,75,75);
uint32_t Blank = strip.Color(0,0,0);
uint8_t count;

void setup() {
strip.begin();
strip.show(); // initialize all pixels to “off”
}

//Main program box
void loop() {
Fade(Gold);
delay(200);
Fade(Turq);
delay(200);
Fade(Green);
delay(200);

for (count = 0; count < 5; count++) {
Snake(White);
}
delay(200);
}

// Brightness Function
void Fade(uint32_t color) {
uint16_t i, j;

//Increase brightness sub-loop
for (j = 0; j < 75; j++) {
for (i = 0; i < strip.numPixels(); i++) { strip.setPixelColor(i, color); strip.setBrightness(j); } strip.show(); delay(50); } // Decrease brightness sub-loop for (j = 75; j > 0; j–) {
for (i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, color);
strip.setBrightness(j);
}
strip.show();
delay(50);
}

}

// Snake Function
void Snake(uint32_t color) {
uint16_t i;

for (i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, Blank); //Clears pixel memory to start Snake
strip.show();
delay(25);
}
strip.setBrightness(50); //Resets brightness after Fade
//Snake loop
for (i = 0; i < strip.numPixels(); i++) {
if(i<1){
strip.setPixelColor(i, color);
strip.show();
delay(100);
}
strip.setPixelColor(i, Blank);
strip.setPixelColor(i+1, color);
strip.show();
delay(100);

}
}

Discover more from Making Studio

Subscribe now to keep reading and get access to the full archive.

Continue reading