Idea

As mentioned in last year's Halloween post, I love making my Trick or Treating costume. When my kids grow up, helping them build theirs will be so much fun!

 
Build

The mask was originally 3D printed in PETg over the course of 4 days, but primer just wouldn't stick to the smooth surface. This last weekend was spent rushing new prints in PLA. The printer ran 24/7 and barely finished before PG&E cut the power. The pictures at bottom show the painting progression - which just finished this afternoon.

The Arc Reactor is made up of two Adafruit NeoPixel rings attached to an Arduino and 3D printed in both clear and black PLA. Using a tiny microcontroller allows full control over the LEDs and enables a 5v power source over USB. The Anker "lipstick" battery pack will be perfect to carry around while grabbing candy with the kids.

Every so often a random LED will jump to 100% brightness for 20ms. This simulates that the arc reactor is alive and makes the costume look that much cooler.

 

Arc Reactor Code

#include <Adafruit_NeoPixel.h>
#define PIN 0
#define NUM_LEDS 60
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);

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

void loop() {
  SnowSparkle(0x35, 0x35, 0x35, 20, random(100,1000)); //change these values
}

void SnowSparkle(byte red, byte green, byte blue, int SparkleDelay, int SpeedDelay) {
  setAll(red,green,blue);
  
  int Pixel = random(NUM_LEDS);
  setPixel(Pixel,0xff,0xff,0xff);
  showStrip();
  delay(SparkleDelay);
  setPixel(Pixel,red,green,blue);
  showStrip();
  delay(SpeedDelay);
}

void showStrip() {
 #ifdef ADAFRUIT_NEOPIXEL_H 
   // NeoPixel
   strip.show();
 #endif
 #ifndef ADAFRUIT_NEOPIXEL_H
   // FastLED
   FastLED.show();
 #endif
}

void setPixel(int Pixel, byte red, byte green, byte blue) {
 #ifdef ADAFRUIT_NEOPIXEL_H 
   // NeoPixel
   strip.setPixelColor(Pixel, strip.Color(red, green, blue));
 #endif
 #ifndef ADAFRUIT_NEOPIXEL_H 
   // FastLED
   leds[Pixel].r = red;
   leds[Pixel].g = green;
   leds[Pixel].b = blue;
 #endif
}

void setAll(byte red, byte green, byte blue) {
  for(int i = 0; i < NUM_LEDS; i++ ) {
    setPixel(i, red, green, blue); 
  }
  showStrip();
}