Jessie’s Final Halloween Costume

IDEATION:

MATERIALS:

shocking pink / salmon / baby pink felt

chenille stems cure-pipes

CIRCUIT DIAGRAM:

To make the gemma show only white colors with a breathing effect.

ARDUINO:

Base on example: strandtest

Modification:

void loop() {

  breathingEffect(strip.Color(255, 255, 255), 20); // White breathing effect

}

void breathingEffect(uint32_t color, int delayTime) {

  // Increase brightness

  for (int brightness = 0; brightness <= 255; brightness++) {

    setStripBrightness(color, brightness);

    delay(delayTime);

  }

  // Decrease brightness

  for (int brightness = 255; brightness >= 0; brightness–) {

    setStripBrightness(color, brightness);

    delay(delayTime);

  }

}

void setStripBrightness(uint32_t color, int brightness) {

  // Set brightness and color to each LED

  for (int i = 0; i < strip.numPixels(); i++) {

    uint8_t r = (uint8_t)(Red(color) * brightness / 255);

    uint8_t g = (uint8_t)(Green(color) * brightness / 255);

    uint8_t b = (uint8_t)(Blue(color) * brightness / 255);

    strip.setPixelColor(i, r, g, b);

  }

  strip.show();

}

uint8_t Red(uint32_t color) {

  return (color >> 16) & 0xFF;

}

uint8_t Green(uint32_t color) {

  return (color >> 8) & 0xFF;

}

uint8_t Blue(uint32_t color) {

  return color & 0xFF;

}

In-progress Images: 

FINAL LOOK:

Discover more from Making Studio

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

Continue reading