Deep-Sea Skirt – Interactive Project – Natalie Croney

FINAL PROJECT

For my interactive project, I created a knit skirt inspired by bioluminescent deep-sea creatures. My main inspiration was the comb jellyfish because of its rainbow lights. The idea is to program a Circuit Playground Arduino to control the colors of a series of eight Neopixels. These Neopixels are sewn evenly around the waist of the skirt. Through movement inputs measured with the built-in accelerometer on the Arduino, the lights change color accordingly. Additionally, the lights only turn on in low-light conditions. This is achieved using the built-in light sensor. The Arduino and battery are held in a free hanging bag to allow the largest range of movement while being worn. It also partially blocks the light, affecting the light sensor. This bag is attached through three separate conductive snaps. These snaps create the connection between the Arduino and the Neopixels. I have added lenses and fiber-optic cables for each Neopixel in order to diffuse the light and create an even more impactful light show.

Materials

  • Brown cotton yarn
  • Brown cotton fabric
  • Fusible interfacing (to stiffen fabric)
  • Embroidery thread
  • Wooden beads
  • Circuit Playground Arduino
  • Sewable Neopixels
  • Battery pack (6V)
  • Conductive thread
  • Knitting needles (circular and double-pointed)
  • Sewing needles
  • Fiber-optic Cables
  • Neopixel Lenses
  • Seam Ripper
  • Hot Glue

I started with the base of the skirt. I hand-knit it on both 5mm circular and double-pointed needles before sewing on the circles and adding the beads on the ends. I then knit a small drawstring bag to hold the Arduino and battery pack.

Next, I stitched on the Neopixels. I made sure that each was facing in the right direction. Each was stitched behind the fabric circles in order to diffuse a bit of the light.

I used a seam ripper to cut small holes in each of the circles to let a little more light through. They were a bit dull before πŸ™

Later, I added lenses to each Neopixel to further diffuse the light. Additionally, I glued on a fiber-optic cable for each light, allowing the light to extend down each “tentacle.”

The fiber-optic cables were “shaved” using a seam ripper to allow the light to show up the whole way down, not just the end. I weaved them through to the beads at the end, securing everything with some glue.

I also made the cables slightly shorter than the i-cords I knitted, making a wavy, tentacle-like appearance.

I stitched three conductive snaps on to the back of the drawstring bag that will attach to the body of the skirt. These snaps are connected to the Neopixels through a bit of extra stitching.

I sewed in the Arduino, making sure to connect data, power, and ground to the corresponding snaps.

I programmed the lights to turn on only in low light. When the environment is too bright, the skirt stays dark. This was inspired by the comb jellyfish since it’s a deep-sea creature.

Code

#include <Adafruit_CircuitPlayground.h>

#include <FastLED.h>

// Pin and pixel count for the lights

#define LED_PIN A3

#define DATA_PIN    A3  

#define LED_COUNT 8

#define LED_TYPE    WS2812B

#define COLOR_ORDER GRB

#define NUM_LEDS    8       // List many neopixels are in any attached strip

#define brightness_MIN     5

#define brightness_MAX     5

int output_level;    // a variable to hold the sensor output data

int numPixels = 8;  // a variable to hold the # of LEDs (10)

float X, Y, Z;

int input_level_light;     // a variable to hold the sensor input data

int output_level_light;    // a variable to hold the sensor output data

int brightness = map(input_level_light, brightness_MIN, brightness_MAX, 255, 0);  //brightness output

uint8_t  frame = 0;    // Frame count, results displayed every 256 frames

CRGB leds[NUM_LEDS];  // this creates an array that will allow the neopixel strip to be mapped

// Declare NeoPixel strip object

Adafruit_CPlay_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {

  CircuitPlayground.begin();

  Serial.begin(9600);

  strip.begin();

  strip.show();

}

void loop() {

  X = CircuitPlayground.motionX();

  Y = CircuitPlayground.motionY();

  Z = CircuitPlayground.motionZ();

  Serial.print(“X: “);

  Serial.println(X);

  Serial.print(“Y: “);

  Serial.println(Y);

  Serial.print(“Z: “);

  Serial.println(Z);

  Serial.println(“——“);

 delay(150);

  CircuitPlayground.clearPixels();  // clear pixels to start

  strip.clear();  // clear external strip too

  output_level = map(X, -10, 5, 0, 255);  //brightness output

  output_level = map(Y, -10, 20, 0, 255);  //brightness output

  output_level = map(Z, -10, 5, 0, 255);  //brightness output

int wheelPos = map(output_level, -10, 20, 0, 255); //color on the wheel

 int color = CircuitPlayground.colorWheel(wheelPos);//set the color on the wheel

 int light = CircuitPlayground.lightSensor();

    for (int i = 0; i <= output_level; i++) {

    strip.setPixelColor(i,color);  // white

    }

  input_level_light = CircuitPlayground.lightSensor();

  Serial.print(“input_level_light: “);

  Serial.println(input_level_light);

  Serial.print(“brightness: “);

  Serial.println(brightness);

  constrain(numPixels, 0,9);

  constrain(brightness,0,255);

strip.show();

  if(input_level_light < brightness_MIN)      brightness = 255;

  else if(input_level_light > brightness_MAX) brightness = 0;

strip.setBrightness(brightness);

}