ink heater the beginnings of a blog

Stupid Pet Trick: Attention-grabbing handbag

Every handbag makes a statement. I'm pretty sure that this shiny yellow one states something to the effect of, "Look at me! Look at me! Look at me!"

There are a lot of handbags out there, though - many of them larger, shinier and arguably more attractive than my awesomely bright and cheerful accessory. For our Stupid Pet Trick assignment, I decided to make some alterations to ensure that my yellow bag continues to stand out in any crowd. An LED on the bag ensures that it's noticed at all times - but upon sight of any handbag that poses a threat, a squeeze of a black coin purse that discreetly houses an FSR sensor causes two other LEDs in the bag to turn on, depending on the amount of pressure exerted upon the coin purse.

The portability of the handbag was severely decreased due to wires, a breadboard and Arduino - which also filled the bag to capacity! - so next time, a breadboard-less, soldered circuit will be the way to go.

Stupid Pet Trick: Attention-grabbing handbag from katherine keane on Vimeo.

Reviewing the Stupid Pet Tricks in class, we discussed possible ways to push this project further. Suggestions included:

  • Use the magnetic snap on the bag as a switch to activate a security alarm, so the bag would light up when opened, OR add an audible alarm using the Tone library
  • Put the sensor on the bag's shoulder strap, to require less input from the wearer to make the lights turn on. On the other hand, the in-hand FSR sensor provides the wearer with a greater degree of control to decide when more lights are necessary to keep the bag in the spotlight.
  • For a subtler effect, create a bag that "glows" upon the wearer's command: construct the bag's exterior from a less opaque material, and the lining from a material that diffuses light, and place LEDs between the exterior and lining.
  • Place the LEDs inside the bag, and use the magnetic snap as a switch to turn them on when the bag is opened, enabling the wearer to easily find specific contents within.

Below is the code I used:

int sensorPin = 0;     // select the input pin for the FSR
int ledPinOne = 9;  //select the digital output pin for the 1st LED
int ledPinTwo = 6; //select the digital output pin for the 2nd LED
int ledPinThree = 5; //select the pin for the 3rd LED
int sensorValue = 0;     // the analog reading from the FSR resistor divider
void setup() {
Serial.begin(9600);
pinMode(sensorPin,INPUT); //set the sensor as the input
pinMode(ledPinOne,OUTPUT); //set 1st LED as output
pinMode(ledPinTwo,OUTPUT); //set 2nd LED as output
pinMode(ledPinThree,OUTPUT); //set 3rd LED as output
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
//sensorValue = sensorValue/4;
Serial.println(sensorValue/4);      // print the sensor value in the debugger
if (sensorValue <=100) {
// turn on ledPinOne
analogWrite(ledPinOne, 127);
analogWrite(ledPinTwo, 0);
analogWrite(ledPinThree, 0);
}
else {
//if the sensor value is between 120 and 180
if ((sensorValue > 120)&&(sensorValue <=180)){
analogWrite(ledPinOne, 255);
analogWrite(ledPinTwo, 127);
analogWrite(ledPinThree, 0);
}
else {
//if the sensor value is between 181 and 255
if ((sensorValue > 181)&&(sensorValue <=255)){
analogWrite(ledPinOne, 255);
analogWrite(ledPinTwo, 255);
analogWrite(ledPinThree, 127);
}
}
}
}
Tagged as: , , 2 Comments
   

my posts

Categories

tag cloud??

android arduino art assistive technology breathing bronx zoo cabinet comics commlab communication computer vision eye tracking forster freshkills FSR games giraffes graphic arts graphics Hospitable Room images interactivity LEDs light midi Mobile Me(dia) museum Nature of Code park PComp physical computing public Rest of You sensor sensors servo spontaneous storytelling stupid sustainability swig & jig tree visitors