Stupid Pet Trick #1

 

 

 

Overall Circuit:

 

11006457_940259445993973_5985161499375004758_n10394653_940259422660642_302201561848217451_n

 

Screen Shot 2015-03-02 at 11.15.26 PM

This is the output area.   11045389_940259365993981_5440655263303309765_n

This is the input, sensor area.

10410895_940259349327316_5473415224563346305_n

Push Sensor

11043000_940259409327310_2376737188354259269_n

When you push the basic force resisting sensor the LED will light up.

11029518_940259379327313_692260226126686727_n 11025139_940259392660645_2404396757996859653_n

This one will require you to push the push button and then as you place your finger closer to the photo cell the LED light will light up brighter.

The Code:

int sensePin = A0;
int ledPin = 9;
int ledPressPin= 8;
int pressPin = A2;
void setup () {

Serial.begin(9600);
pinMode (ledPin, OUTPUT);
pinMode (ledPressPin, OUTPUT);

}

void loop () {

//Serial.println (analogRead (sensePin));
Serial. println (analogRead (pressPin));

int valLight = analogRead (sensePin);
int valPress= analogRead (pressPin);

if (valPress > 0) digitalWrite(ledPressPin, HIGH);
else digitalWrite (ledPressPin, LOW);

valLight = constrain (valLight, 750, 900);
int ledLevel = map (valLight, 750, 900, 255, 0);

analogWrite (ledPin, ledLevel);

// if (val < 800) digitalWrite (ledPin, HIGH);
// else digitalWrite (ledPin, LOW);
}

3 Switches

 IMG_5045

My Original Sketches of my 3 switches.

1. Petting the Mouse. When you pet the mouse the conductive thread would teach other making the LED light.

2. Pressing the Heart. When you press the heart the LED would light with the conductive fabric.

3. Making a Flower. When you put the petals together the LED would light.

IMG_5047

My first time at making a pushing LED. It worked but it was very unstable.

IMG_5161

My final three switches.

IMG_5124 IMG_5125 IMG_5126

The mouse trap switch. When you place the mouse onto the copper wire (trap) it will light up. The basic component of the circuit is inside the mouse. The mouse has copper tape under it and when placed onto the copper tape of the mouse trap, the nose of the mouse (LED) will light up.

IMG_5128 IMG_5130 IMG_5131

Lighting the Christmas tree switch. In this switch I used electric paint to help connect the led with battery. I attached the other end of the LED with conductive thread and tapped it onto the battery (making it look like the trunk of the tree). When placed onto the conductive paint the star will light up.

    IMG_5133 IMG_5134

Bringing life back into the girl. When you place the conductive hearts together the LED would light up.

IMG_5135

Back of the circuit.