The Center for Sustainable Foolishness

"Start a huge, foolish project, like Noah. It makes absolutely no difference what people think of you." -Rumi

You are currently browsing the Arduino category.

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!

Add a comment

Lab 2 – Pot and Flex. Yum.

I worked with a potentiometer. I made it work!


Then I tried to work with a stretch sensor, but I couldn’t get it to work. I decided to use another sensor.

I moved on to a flex sensor.

My sad little flex sensor and LED. I got it to work, to dim and get brighter, but I couldn’t figure out how to make the light go off all the way. I am still trying to work out the coding part to bring logic to these machines. I am beginning to understand the circuitry, but making the computer talk to the circuitry I am having a hard time with. Keep on truckin,’ keep on learnin.’ I need several afternoons with few shots of espresso by my side while I spend some quality time with “Getting Started with Arduino.”


Add a comment

Arduino Lab #1 – Send In The Clowns!

It’s always hard to know when to really go for it. You think she likes you, but you never know. If only you got a green light. Literally. Like, a green LED light to blink if there is that magical chemistry.

Well, I can’t program Arduino to sense pheromones (yet!) but I can make the light blink if you get close enough to some chick’s face, and if you’re both wearing clown noses.

The first Physical Computing assignment of MY LIFE was to set up a microcontroller to make an LED light up. I had never heard of any of these words before I took this class – but hey, trial by fire, right? I didn’t want to mess with noses first, so I began with a button.

Following the syllabus, pictures, and schematic pretty carefully – I figured out how to hook it up to a button, so the yellow light would be on until you pressed the button, then the red light would be on. I’m being purposely vague because I don’t really know what I did, I just know I did it. Go me.

Then, I wanted to add some sass to this baby. I thought, what if I put metal on the tips of a pair of clown noses, and those would serve as a switch for the light?

After chatting with some other awesome PCompers, some other ideas occured – something about a magnet switch, which would allow only one nose to be wired. Something about magnets and window alarms. Cool, but I didn’t have one of those.

Then Corrie suggested what if the noses themselves lit up? I thought that was a great idea, but I didn’t know how to execute it. So she drew me a diagram.

After attempting to put LEDs in the foam noses, realizing I didn’t buy extra replacement noses in case I destroyed one, and also thinking that I didn’t have time to really figure out if this was going to work or not, I decided to stick with my original idea: The Clown Love o’ Meter.

Clowns need love too. Clowns are sad.

So, instead of using the button as a switch, I used two pieces of metal.

Now knowing that the metal was going work, I then poked holes in the noses and hotglued the metal to the tips of the noses. I wired the noses to the breadboard and the Arudino. Then I tested it! Success! After a few tries.

I didn’t wire the noses directly at the tip (foam is a temperamental material!) so it took a little nuzzling to get the green light to go off. Nuzzling can be fun and interactive, so it wasn’t too big of a problem.

Check out the video below for some hot clown action.

Clown Love from Krystal Banzon on Vimeo.

An interesting epiphany: I didn’t realize how interaction can be so playful – I mean, I know we talk about it all the time at ITP, and I know that “playful” is something we all hope to be, “play” is a verb we want to put into practice, and “playfulness” an attitude that we strive for. It wasn’t until I was trying to smash my nose into my friend Jenny’s face, how we were forced to break our personal space bubble, and when I had to grab her head to face me because we kept missing on closing the switch, that I realized – wow, something other than a finger to interact with something, or someone, can make something really fun. Things that struck me: using body parts other than hands, interacting with another person (as well as the computer), and breaking personal space.

Acknowledgements:
– Corrie Van Sice for her patience, advice, and diagram. She had the unfortunate luck of sitting next to me in the PComp lab through all of this.
– Arturo Vidich for videotaping
– Noah Waxman for going through the steps with me
– Yea Bin Diana Oh for inspiration
– Jenny Logico (below) for being my guinea pig!

– And a shout out to Lisa Maria for being your bad Nica self!

Clown blooper for your enjoyment:

Untitled from Krystal Banzon on Vimeo.

Add a comment

Arduino Lab #1 – Send In The Clowns!

It’s always hard to know when to really go for it. You think she likes you, but you never know. If only you got a green light. Literally. Like, a green LED light to blink if there is that magical chemistry.

Well, I can’t program Arduino to sense pheromones (yet!) but I can make the light blink if you get close enough to some chick’s face, and if you’re both wearing clown noses.

The first Physical Computing assignment of MY LIFE was to set up a microcontroller to make an LED light up. I had never heard of any of these words before I took this class – but hey, trial by fire, right? I didn’t want to mess with noses first, so I began with a button.

Following the syllabus, pictures, and schematic pretty carefully – I figured out how to hook it up to a button, so the yellow light would be on until you pressed the button, then the red light would be on. I’m being purposely vague because I don’t really know what I did, I just know I did it. Go me.

Then, I wanted to add some sass to this baby. I thought, what if I put metal on the tips of a pair of clown noses, and those would serve as a switch for the light?

After chatting with some other awesome PCompers, some other ideas occured – something about a magnet switch, which would allow only one nose to be wired. Something about magnets and window alarms. Cool, but I didn’t have one of those.

Then Corrie suggested what if the noses themselves lit up? I thought that was a great idea, but I didn’t know how to execute it. So she drew me a diagram.

After attempting to put LEDs in the foam noses, realizing I didn’t buy extra replacement noses in case I destroyed one, and also thinking that I didn’t have time to really figure out if this was going to work or not, I decided to stick with my original idea: The Clown Love o’ Meter.

Clowns need love too. Clowns are sad.

So, instead of using the button as a switch, I used two pieces of metal.

Now knowing that the metal was going work, I then poked holes in the noses and hotglued the metal to the tips of the noses. I wired the noses to the breadboard and the Arudino. Then I tested it! Success! After a few tries.

I didn’t wire the noses directly at the tip (foam is a temperamental material!) so it took a little nuzzling to get the green light to go off. Nuzzling can be fun and interactive, so it wasn’t too big of a problem.

Check out the video below for some hot clown action.

Clown Love from Krystal Banzon on Vimeo.

An interesting epiphany: I didn’t realize how interaction can be so playful – I mean, I know we talk about it all the time at ITP, and I know that “playful” is something we all hope to be, “play” is a verb we want to put into practice, and “playfulness” an attitude that we strive for. It wasn’t until I was trying to smash my nose into my friend Jenny’s face, how we were forced to break our personal space bubble, and when I had to grab her head to face me because we kept missing on closing the switch, that I realized – wow, something other than a finger to interact with something, or someone, can make something really fun. Things that struck me: using body parts other than hands, interacting with another person (as well as the computer), and breaking personal space.

Acknowledgements:
– Corrie Van Sice for her patience, advice, and diagram. She had the unfortunate luck of sitting next to me in the PComp lab through all of this.
– Arturo Vidich for videotaping
– Noah Waxman for going through the steps with me
– Yea Bin Diana Oh for inspiration
– Jenny Logico (below) for being my guinea pig!

– And a shout out to Lisa Maria for being your bad Nica self!

Clown blooper for your enjoyment:

Untitled from Krystal Banzon on Vimeo.

1 comment