"Irrational thoughts should be followed absolutely and logically." - Sol Lewitt
Preferably riding a sea monster.

10.06.2009

Stupid Pet Trick! Phys Comp Week 5

It is October and the burgeoning autumn is filled with the gorgeous purples and reds of fall leaves, fields of pumpkins, clear nights, crispy air, and THE COMING COLD. The upcoming months of celebration and Thanksgiving makes me think - what about the homeless? What can I, with an arudino and LEDs do for the poor and without shelter?

Then an idea came to me: What if Hobos (Hoboes? Hobi?) could keep themselves warm?

For my first stupid pet trick I was going to create a Hobo Warmer.

I sewed a thermoster, a sensor that senses heat, into a pair of gloves.















I then hooked up the gloves to five LEDs that will light up one at time the more heat you generate while rubbing your hands together.















Before I used the gloves, I tried it with one LED to make sure it worked.

Pet Trick Test! from Krystal Banzon on Vimeo.


Below is a video of my Hobo Warmers and the code I used to program the arduino.

Hobo Warmth - My First Pet Trick from Krystal Banzon on Vimeo.


CODE:
int potPin = 0; // Analog input pin that the potentiometer is attached to
int sensorValue = 0; // value read from the analog sensor
int led0 = 3; // PWM pin that the LED is on. n.b. PWM 0 is on digital pin 9
int led1 = 4;
int led2 = 7;
int led3 = 8;
int led4 = 12;

void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
// declare the led pin as an output:
pinMode(led0, OUTPUT);
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
}

void loop() {
sensorValue = analogRead(potPin); // read the pot value

// map the sensor vaue from the input range (400 - 900, for example)
// to the output range (0-255). Change the values 400 and 900 below
// to match the range your analog input gives:
int brightness = map(sensorValue, 26, 27, 0, 255);
analogWrite(led0, brightness); // set the LED brightness with the result

int brightnessMore = map(sensorValue, 29, 30, 0, 255);
analogWrite(led1, brightnessMore);

int brightnessEvenMore = map(sensorValue, 31, 32, 0, 255);
analogWrite(led2, brightnessEvenMore);

int brightnessMost = map(sensorValue, 33, 34, 0, 255);
analogWrite(led3, brightnessMost);

int brightnessBest = map(sensorValue, 35, 37, 0, 255);
analogWrite(led4, brightnessBest);

Serial.println(sensorValue); // print the pot value back to the debugger pane
delay(20); // wait 10 milliseconds before the next loop
}

PAST LABS:

Electronics Lab















All right! Testing voltage with a micrometer.















Video of my breakthrough figuring out the servomotor using a flex sensor!



Working hard with my girl, Lisa Maria.















Shoutout to my boys Benji and Garrad!















For more pictures of the all night work party, click here!