Sarah’s Halloween Progress

My headless crystal skeleton is meant to freak people out at night. Since the body suit and head cover is black it should blend into darkness while the reflective bones shimmer and the skull glows. The intention is for it to look like a headless skeleton is holding it’s own glowing-crystal head.

First Sketch (Now reflective vinyl bones & one piece bodysuit)

Progress

Testing Reflective Vinyl in dark room
Making Crystal Piece using different size silicon crystal molds
Near finished crystal piece
Cutting plastic skull to insert base that will hold LED, Gemma, battery & crystals
Top open. Cutting out base.

CODE
Tinkercad is not working but it is working on my Neopixel. Below is my current code that will be further tweaked to have to gaps between the rainbow effect and color pulses.

The crystal should pulse aqua blue a few times. Then pulse pink, pulse dark blue. Rainbow gradient effect and repeat.

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN     6

// How many NeoPixels are attached to the Arduino?
#define LED_COUNT  60

// NeoPixel brightness, 0 (min) to 255 (max)
#define BRIGHTNESS 50 // Set BRIGHTNESS to about 1/5 (max = 255)

// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRBW + NEO_KHZ800);
// Argument 1 = Number of pixels in NeoPixel strip
// Argument 2 = Arduino pin number (most are valid)
// Argument 3 = Pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)

// Change These Variables
int maxBrightness = 100;
int minBrightness = 10;
int fadeSpeed = 15;



void setup() {
  // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
  // Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif
  // END of Trinket-specific code.

  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  strip.setBrightness(BRIGHTNESS);
}

void loop() { 
    pulseColor(strip.Color(27, 103, 107), fadeSpeed); // Teal
    pulseColor(strip.Color(27, 103, 107), fadeSpeed); // Teal
    pulseColor(strip.Color(27, 103, 107), fadeSpeed); // Teal
    pulseColor(strip.Color(240, 40, 140), fadeSpeed); // Pink
    pulseColor(strip.Color(27, 0, 240), fadeSpeed); // Blue

  
    rainbowFade2White(3, 3, 1);


}


void pulseColor(uint32_t c, uint8_t wait) {
  //Increase Brightness / Fade In
  for(int i=minBrightness; i<maxBrightness; i++) {
      strip.setBrightness(i);
      for(int x=0; x<strip.numPixels(); x++){
        strip.setPixelColor(x,c);
      }
      strip.show();
      delay(wait);
  }
  //Lower Brightness / Fade Out
  for(int i=maxBrightness; i>minBrightness; i--) {
       strip.setBrightness(i);
      for(int x=0; x<strip.numPixels(); x++){
        strip.setPixelColor(x,c);
      }
      strip.show();
      delay(wait);
  }
}



//GRADIENT RAINBOW



void rainbowFade2White(int wait, int rainbowLoops, int whiteLoops) {
  int fadeVal=0, fadeMax=100;

  // Hue of first pixel runs 'rainbowLoops' complete loops through the color
  // wheel. Color wheel has a range of 65536 but it's OK if we roll over, so
  // just count from 0 to rainbowLoops*65536, using steps of 256 so we
  // advance around the wheel at a decent clip.
  for(uint32_t firstPixelHue = 0; firstPixelHue < rainbowLoops*65536;
    firstPixelHue += 256) {

    for(int i=0; i<strip.numPixels(); i++) { // For each pixel in strip...

      // Offset pixel hue by an amount to make one full revolution of the
      // color wheel (range of 65536) along the length of the strip
      // (strip.numPixels() steps):
      uint32_t pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());

      // strip.ColorHSV() can take 1 or 3 arguments: a hue (0 to 65535) or
      // optionally add saturation and value (brightness) (each 0 to 255).
      // Here we're using just the three-argument variant, though the
      // second value (saturation) is a constant 255.
      strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue, 255,
        255 * fadeVal / fadeMax)));
    }

    strip.show();
    
    delay(wait);

    if(firstPixelHue < 65536) {                              // First loop,
      if(fadeVal < fadeMax) fadeVal++;                       // fade in
    } else if(firstPixelHue >= ((rainbowLoops-1) * 65536)) { // Last loop,
      if(fadeVal > 0) fadeVal--;                             // fade out
    } else {
      fadeVal = fadeMax; // Interim loop, make sure fade is at max
    }
  }
}

Crystal Skeleton Materials
Reflective vinyl – iron on
Black ‘party suit
Black lycra mask
plastic skull
Crystal Resin molds
Resin mix + UV curing light
Flexible NeoPixel LED strip (60 LED)
Gemma MO – adafruit
Li-Ion 500 mAh Battery
White Spray Paint
Blue Foam
Hot Glue & X-acto knife


To -Do List

  1. Finalize Arduino code & test on both of my LED strip
  2. Solder Gemma/LED
  3. Finish making resin crystal
  4. Finish base that will hold crystal and LED/battery/Gemma
  5. Place base in skull, secure it, finish any decorative coverup
  6. Trace skeleton bones on Vinyl & cut
  7. Adhere Vinyl bones onto black body suit