# Spin Switch

For my innovative switch I created a yarn tassle that triggers a LED strip when spun. The inspiration behind the switch came from my background in figure skating. I imagined this to be used when skaters spin and LEDs in their outfits would be activated.

To start, I looked at Leila’s J-Lo spinning toy and did some experiments with springs to understand how to make a connection with centripetal force. Then I learned how to crochet with Natsuki and worked with her to create templates that made stretchy yarn tubes. To make the switch I crocheted conductive yarn into regular yarn and attached hex nuts to give weight at one end. When pulled the resistance in the yarn tube’s conductivity decreases because the yarn is more tightly held together.

From there I used the yarn tube as an analog switch to monitor the change in resistance. When pulled the resistance of the switch went from 1000 to under 900. I programmed the change to signal the turning on of an LED. Then I altered the code on a NeoPixels LED strip to create a color swipe.

int ledPin = 9;
int sensorPin = 0;
int threshold = 800;

void setup()
{
pinMode(ledPin,OUTPUT);
Serial.begin(9600);
}

void loop()
{
rainbow(20);
}
}

void rainbow(uint8_t wait) {
uint16_t i, j;

for(j=0; j<256; j++) {
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((i+j) & 255));
}
// Set all LEDs to black
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, 0,0,0);
}
strip.show();

break;
}
strip.show();
// delay(wait);
}
}

The best part of this process was bringing together the NeoPixels LED strip and the analog stretchy switch. I learned to how for loops work and how to break them so that the LED strip turns off once the switch returns to its original, un-pulled state. Because my main goal for the class is to better understand code, I felt like this part of the process was the most challenging and rewarding.

I also learned to hard wire my wires and switch, but ultimately failed to make the full connections. For the final demo, I ended up using masking tape to hold down all the wires on my breadboard and quickly sewed a pocket belt to encase the parts.

To move forward I’d have to find a way to make this switch wearable and stable so that the centripetal force from the spinner causes the switch to pull. For now, swinging the switch works just fine.

<p><a href=”http://vimeo.com/111701202″>Making Studio: Centripetal Force Switch</a> from <a href=”http://vimeo.com/edenlew”>Eden Lew</a> on <a href=”https://vimeo.com”>Vimeo</a&gt;.</p>