Tuesday, March 26, 2013

Project 3 - Motors



Sure people paint walls, but walls are still mostly a functional housing unit, but they could be so much more. By giving walls movement, they could become points of intrigue and interactive art pieces all on their own. These are the ideas that served as inspiration for my theoretical motors project


This is the hyposurface wall. A quote from their website states, "The Hyposurface allows participants to connect and interact with a massive, powerful force - its like controlling a waterfall." I love this idea of a sort of butterfly effect. One small touch has dramatic effects across something much larger.



This installation is called The Reef. I like this one for completely opposite reasons.  The movement here is gentle and quiet. It exudes a peacefulness that is a bit unexpected from a large wall, but I love the actual elicitation of emotion that I feel from this piece.


My proposed idea is a bit of a combination of both of these pieces. When I first thought of a moving wall I began to think of it as a living creature which led to me wanting it to breath. I then thought of the wall as the side of a giant, mystic creature like a dragon and thought of it as covered in scales. I found the following photograph extremely beautiful and think it would serve as a concept art for the look of the wall.


So the wall would be covered in these scales and each scale would have two motors and a pressure sensor attached to it. The entire wall would move in and out in a steady rhythm (with the middle moving more than the sides in a sort of parabolic surface shape - imagine the side of a dragon). In my mock up I have the servo motor controlling this motion since I can get a very steady rhythm with this motor. Then when the wall is touched the scale where the wall is touched and the surrounding scales ruffle out in a ripple effect. In my mock-up I have this motion controlled by the stepper motor.

Here is a diagram of my Arduino setup for this project:



And here is my code for this project:


#include <Stepper.h>
#include <Servo.h>
 
// change this to the number of steps on your motor
#define STEPS 48
Stepper myStepper(STEPS, 8, 9, 10, 11);
Servo myServo;  // create servo object

int pressPin = A7;
int press_val = 0;
int prev_press_val = 0;

int potpin = 0;  // analog pin used to connect the potentiometer
int pot_val = 0; // variable to read the value from the analog pin

void setup()
{
  // set the speed of the motor to 100 RPM
  myStepper.setSpeed(150);
  myServo.attach(2);  // servo control signal sent out pin 9
 
  Serial.begin(9600);
}

void breath()
{
  boolean interrupt = false;
  while(!interrupt)
  {
    for(int i=0; i<100; i++)
    {
      myServo.write(i);
      delay(15);
    }
    for(int i=0; i<400; i++)
    {
      press_val = analogRead(pressPin);
      Serial.println(press_val);
      if(press_val>50){interrupt = true;break;}
      delay(1);
    }
    //delay(1000);
    for(int i=100; i>0; i--)
    {
      myServo.write(i);
      delay(15);
    }
    for(int i=0; i<400; i++)
    {
      press_val = analogRead(pressPin);
      Serial.println(press_val);
      if(press_val>50){interrupt = true;break;}
      delay(1);
    }
    //delay(1000);
    //see if there was a change in the pressure value
    press_val = analogRead(pressPin);
    Serial.println(press_val);
    if(press_val>50){interrupt = true;}
   
  }
}
void loop()
{
   while(true){
    breath();
    myStepper.step(40);
    delay(100);
    myStepper.step(-40);
  }

 }

No comments:

Post a Comment