Photocell Sensor Garment

by IreneL24 in Craft > Fashion

593 Views, 6 Favorites, 0 Comments

Photocell Sensor Garment

IMG_8054.jpg

Photocell sensor garment connected to sewable LEDs // Coded with Arduino UNO

Create the Garment

13242056_10208469020835102_100207371_o.jpg
13223554_10208469020795101_891621994_o.jpg
13235009_10208469020675098_676281162_o.jpg
13223520_10208469021075108_13454526_o.jpg
13112682_10208469020555095_1692726378_o.jpg
13224321_10208469020995106_495954621_o.jpg
13223693_10208469021035107_1680580119_o.jpg
13223609_10208469021155110_1297276053_o.jpg
13230678_10208469021275113_1323901569_o.jpg
IMG_8077.jpg

For my garment I used:

- Organza, wool roving (felted on tulle), and polyester lining with a ribbon to tie the back

Code the Photocell With Arduino + Test It Out

13214617_10208469021595121_215479932_o.jpg
13230819_10208469021555120_997566652_o.jpg
13223663_10208469021475118_564853359_o.jpg

This is the code I used:

// Pins

int sensorPin = A0; int lightPin = 3;

// Variables int lightState = 0; int lowThreshold = 70; int highTreshold = 250;

void setup() { // Start Serial & set pin to output Serial.begin(9600); pinMode(lightPin,OUTPUT); }

void loop() {

// read the sensor: int sensorValue = analogRead(sensorPin);

// If light level is low is detected, switch light on if (sensorValue < lowThreshold){ digitalWrite(lightPin, HIGH); } // If light level goes up again, switch the lights off if (sensorValue > highTreshold){ digitalWrite(lightPin, LOW); }

// read the sensor: sensorValue = analogRead(sensorPin);

// apply the calibration to the sensor reading sensorValue = map(lightState, lowThreshold, highTreshold, 0, 255);

// in case the sensor value is outside the range seen during calibration sensorValue = constrain(sensorValue, 0, 255);

// fade the LED using the calibrated value: analogWrite(lightPin, sensorValue);

}

Sew the LEDs on With the Circuit + the Photocell

13223461_10208469021675123_430740453_o.jpg
IMG_8066.jpg

Light It Up!

IMG_8043.jpg
IMG_8046.jpg
IMG_8084.jpg

Video:

https://vimeo.com/166504763