Friday, December 14, 2012

Final Project - Orlando

So for my final project I wanted to work on a piece that was playful and interactive while at the same time having some sort of darkly humorous sexual connotation. Picking up where Felix Gonzalez Torres left off, my candy dispenser is meant to comment on the gay experience and hook up culture. The phrase candidly scribbled on the modest cardboard box container i chose reads "Give my some of your hunny". Channeling Winnie the Pooh's love of sweet treats and his insatiable desire to feed this appetite, the phrase is re-worded borrowing from gay lingo with the purposefully misspelled term "hunny", slang for ones love interest. The box begs for attentive contact from the viewer. After a bit of "fooling around" with the box, it eventually releases a bit of candy from its lower regions.

The piece worked exactly as I planned with the exception of the motor I used. Originally I wanted to hack a found ice cream machine motor from a thrift store. I got the motor to run with arduino but in a very dangerous way. I unknowingly was using an AC motor, which is a little trickier to run with our micro controllers. Arduino is really designed to work with DC current, which is easier to control and manipulate. It is in fact possible to run an AC motor with arduino, but it isnt really an exact science. Multiple components are needed beyond what we have covered in class, and unfortunately for me they were not readily available at our neighborhood Radio Shack stores. 

Below I have included a picture of the finished project along with a picture of my UNSAFE circuit and a video of the Ice cream machine motor running UNSAFELY with the Arduino. 

In the spirit of the open source culture supporting the Arduino platform, I am also pasting my code below for connecting a servo motor to an ultrasonic rangefinder (the sensor I used in my project):

#include <AFMotor.h>
#include <Servo.h> 

Servo servo1;
#define sensorPin 9 

long pwmRange, inch, cm;

void setup() {
  
  // turn on servo
  servo1.attach(9);
  
  pinMode(sensorPin, INPUT); //range finder
}

void loop() {
  
  pwmRange = pulseIn(sensorPin, HIGH);

  inch = pwmRange / 147; 
  // convert inch to cm 
  cm = inch * 2.54;

  if (inch <= 60) 
   {  
  for (i=0; i<255; i++) 
    analogWrite(Servo,i);
    delay(3);
  }
    
  for (i=255; i=0; i--) {
    servo1.write(i-255);
    
    }
    
  for (i=0; i<255; i++) {
    servo1.write(i);
    delay(3);
     }

  for (i=255; i!=0; i--) {
    servo1.write(i-255);
    delay(3)
  }
}









No comments:

Post a Comment