Thursday, May 9, 2013

Mutevoli


I finally decided to name my piece Mutevoli which means ever changing because I intentionally created the visual to constantly being drawing over itself as each consecutive person interacted with the piece. This represents how in life we as people are constantly growing and changing and our lives are constantly changing too.  I often fear to some extent and avoid to a large extent, change. And even in creating art I often do not push myself to explore far enough because I find one pattern or combination that I like so I stop so as to keep from ruining what I have achieved so far allowing fear of failure to keep me from possibly achieving something even better. So this piece for me was a piece that was built to change so that I could not control it. It was up to other people to continually recreate the piece. This also symbolized for me the degree to which other people's lives intertwine with your own and how other people can change your life even if do not intend for them to.

"To exist is to change, to change is to mature, to mature is to go on creating oneself endlessly." - Henri Bergson



Other people seemed to enjoy the piece at Vizagogo. Though it may not have had the same meaning for everyone as it did for me I enjoyed watching people happily interact with my piece. Children loved it and I was glad that it held up against their extreme interaction with it. One girl told me she found it very therapeutic while one woman asked me if I had patented it, and another woman even told me that she wanted one for her home.

Here are some videos of the piece in action: 
(Unfortunately, the embedding is not working today so I posted them on Youtube and have supplied the links here)

 http://www.youtube.com/watch?v=2MLvU9bpzxM

http://www.youtube.com/watch?v=mu9lyMZK9OQ&feature=youtu.be
 

Thursday, April 25, 2013

Final Project Update

It's been a while, but I've been busy working hard. Here is an update on my progress:

Things that I have done/working:
  • The screen is built. I used spandex and pvc pipe to construct a screen that stands 6 ft tall and 6'4" across. The interaction with the screen itself is very nice. The spandex is soft and inviting to touch
  • I have the kinect software running smoothly in Visual Studio. After writing some calibration code I am getting a very clean read on the screen (no noise). I had attempted to use Processing originally, but after finally winning the battle to get all of the kinect and opencv libraries that I needed running with Processing on my 64 bit Windows 7 machine, I was dismayed to discover that these libraries used a hacked Kinect driver rather than the official driver released by Microsoft. I am blaming this driver for the terrible lack of quality in the depth information that I was getting from the Kinect in Processing. I decided to go back to the official Windows SDK and learn Direct2D.
  • I have a visual application that generates rectangles which are rotated according to how far the screen is being displaced inward. The rectangles are sized according to the radius of the area of the screen that is displaced. This is not the original application that I had planned, but it is visually appealing and fun to interact with. It kind of grew out of my methods for debugging my program to detect areas of pressure on the screen. To detect these pressure points I process the depth image from top left corner to the right and then down. I simply check if the depth at a pixel is greater than zero and then check all of the currently existing "blocks" of pressure/depth which only store the start and max x and y coordinates. I see if this pixel is within a threshold distance of the x or y max then add this pixel to the block by updating the appropriate max value. This is a very fast and efficient way to detect multiple disjoint areas of pressure on the screen. 
Here are some images that my installation has created:


Things that Dont Work or Aren't Finished:
  • I am having trouble with a hotspot showing through from the projector. I think my screen is just too thin. You can see straight through the fabric. I thought that offsetting the projector would fix this, but my screen is too big to get the hotspot out of viewing range. I have also tried putting some diffusing materials like wax paper or dryer sheets in front of the projector light but these solutions do not work.
  • I originally proposed a fractal exploration application for the screen which I would still like to complete. I have mostly implemented an image sequence exploration application which parses through the frames of the image or video sequence to the depth of the displacement and then plays the video back to the first frame. I plan to make a fractal zoom video using Mandelbulb3D and then use the image sequence viewing technique allow users to interactively explore the fractal
Videos Coming Soon!

Tuesday, March 26, 2013

Final Project Idea


I finally figured out what I want to do for my final project!
It involves touch based interaction, movement, and projection

Here are two projects that are basic variations on what I want to do:

Firewall
http://www.amusement.net/2012/12/21/firewall-spandex-and-a-kinect-make-for-a-great-interactive-installation/


Khronos Projection
http://www.k2.t.u-tokyo.ac.jp/members/alvaro/Khronos/
(I absolutely love this one! I love how the aspect of time is also involved in this one!!!)



I was thinking of introducing a difference between these pieces and my piece by allowing the spandex to be able to be touched and deform accordingly, but I would also have the canvas moving itself. I could use some simple motors to create this motion but I am actually moving away from this thought now.

Actually now I am thinking of combining this with some of my thesis research ideas. I am very intrigued and involved with the creation of  systems to ease the interaction with a digital 3D world by using traditional clunky 2D interfaces and non-intuitive tools such as keyboard and mouse. I realize that this pushing into the fabric gives us access to a third dimension that I would love to leverage to the advantage of the creation of 3D animation and art. Therefore, I will create an interactive art piece (most likely based on some sort of physics simulation) that reacts/animates due to the user's input on this screen in 3 dimensions. Then later I can extend the piece to be an actual tool for interacting with 3D software such as Maya by allowing the creation of 3D curves and the placement of objects in 3D space.

What I will need:
  • A large piece of spandex
  • Kinect (or an IR sensor)
  • Projector
  • (Maybe: Arduino and motors)
(I will update this timeline as my ideas take a more solid form and the problem areas develop in the project. My main concern right now is figuring out the best way to get the fine grain control over sensing the position/placement of user's touch on the canvas in 3 dimensions)
Timeline:

  • Week 1:
    • Acquire Supplies
    • Generate basic installation setup (configure a stand for the fabric, figure out how to set up projector and Kinect)
    • Get the projector to communicate with my laptop
    •  Download Kinect software and get it running on laptop
  • Week 2:
    • Learn the basics of interacting with the Kinect
    • Get the Kinect to recognize motions of the fabric in 3 dimensions (If the interaction is not fine grain enough we will have to move to the IR sensor)
    • Finalize idea for projected images and interaction
  • Week 3:
    • Get basic Simulation(or projection interaction) working
  • Week 4:
    • Get everything that didn't go right the first time around working and work out bugs
  • Week 5:
    • Plan on finishing early because you won't really

Final Project Inspiration


In brainstorming for the final project, here are some concepts and pieces that I find interesting:

I really like the idea of giving objects or machines personalities. Terry Border does just this in a simple yet effective way with his sculptures.
http://wildammo.com/2012/03/22/living-objects-if-household-items-food-came-alive/#14
household-items-come-alive-wildammo (4)


As I mentioned before I really love mechanical sculptures. The work of David C. Roy is probably my favorite of these kinetic sculptures. His are wound springs, but I could do something similar with Arduino motors. I have never done wood working though.
http://www.woodthatworks.com/





I love both of these pieces. They are so simple yet use motion to become memorizing.
I could definitely see myself creating a similar piece using pendulum motion to create an intriguing computer powered kinetic sculpture





I also love the work of Gideon Obarzaneks. I have been playing with the idea of using projection in my final project and I think even though he works with dancers and I would not be in this case, great inspiration can be drawn from the unique ways he uses projections with motion to evoke emotions


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);
  }

 }

Tuesday, March 5, 2013

Project 2 Results

Here is a result video from my theoretical project described in the previous blog:

I left the inherent noise in the readings from the accelerometer to give the image more visual interest.
You can see the lines being drawn here change color as I squeeze the pressure sensor and the lines move around the screen as I tilt the accelerometer.

Some suggestions from class that would be nice to add to this are that in order to incorporate time into the generated piece I could have the color palette shift from cool to warm as the day progresses so that the older lines will push back into the page and the newer,warmer lines will come forward. Also playing with the thickness of the line being drawn would be more interesting. However, this was just a theoretical project. I would have to actually make a wearable device and try it over the course of an entire day to see if it generated something that I was happy with.

Here is a schematic of my Arduino board setup:


Here is my code for this project:

This is the Arduino file:


int R = 14;
int G = 16;
int B = 15;

int X = A8;
int Y = A9;
int Z = A10;

int x_val = 0;
int y_val = 0;
int z_val = 0;

int prev_x = 0;
int prev_y = 0;
//int base_z = 798;

int r_val = 0;
int g_val = 0;
int b_val = 0;
 int inc_val = 5;
 int r_inc = inc_val;
 int g_inc = 0;
 int b_inc = 0;

int pressPin = A12;
int press_val = 0;
int prev_press_val = 0;

int r = 0;
int g = 0;
int t = 0;

/* 5V input
int base_x = 518;
int base_y = 515;
int base_z = 798;
*/

//3.3 Volt
int base_x = 365;
int base_y = 335;
int base_z = 492;

int scale = 100;

String send_to_serial = "";

const int ledPin[10] =  {
  4,5,6,7,8,9,10,11,12,13};      // the number of the LED pins
int ledState = 0;

void setup()
{

  Serial.begin(9600);

  // initialize the digital pin as an output.
  pinMode(R, OUTPUT);
  pinMode(G, OUTPUT);
  pinMode(B, OUTPUT);

   // set the digital pin as output:
  for(int i = 0; i < 10 ;i++){
    pinMode(ledPin[i], OUTPUT);
  }
}

void loop()
{
  send_to_serial = "";
 
  //might not get anything from tilt in this case...
 
  //read the accelerometer and subtract off base/rest value
  x_val = analogRead(X) - base_x;
  y_val = analogRead(Y) - base_y;
  z_val = analogRead(Z) - base_z;
 
  //take the difference between the last time and this time
  int delta_x = x_val - prev_x;
  int delta_y = y_val - prev_y;
 
 //If the pressure sensor is squeezed change the color
 press_val = analogRead(pressPin);

 //calculate the current color
 if(press_val>prev_press_val)
 {
    //increment the color
    if((r_inc==inc_val && r_val>=255) || (r_inc==-inc_val && r_val<=0))
    {
       if(r_val>=255)
       {
         r_val=255;r_inc=0;
         if(b_val>=255){ b_inc=-inc_val;}
         else{g_inc=inc_val; b_inc = 0;}
       }
       if(r_val<=0){r_val=0;r_inc=0;b_inc=inc_val;}
    }
    if((g_inc==inc_val && g_val>=255) || (g_inc==-inc_val && g_val<=0))
    {
      if(g_val>=255)
      {
        g_val=255;g_inc=0;
        if(r_val>=255){r_inc=-inc_val;}
        else {b_inc = inc_val;r_inc=0;}
      }
      if(g_val<=0){g_val=0;g_inc=0;r_inc=inc_val;}
     }
      if((b_inc==inc_val && b_val>=255) || (b_inc==-inc_val && b_val==0))
      {
        if(b_val>=255)
        {
         b_val=255;b_inc=0;
         if(g_val>=255){g_inc=-inc_val;}
         else{ r_inc=inc_val;g_inc=0;}
        }
        if(b_val<=0){b_val=0;b_inc=0;g_inc=inc_val;}
       }
       
      r_val+=r_inc;
      g_val+=g_inc;
      b_val+=b_inc;
       
 }

 //Send the information to Processing using the Serial Port
 send_to_serial.concat(x_val);
 send_to_serial.concat(' ');
 send_to_serial.concat(y_val);
 send_to_serial.concat(' ');
 send_to_serial.concat(z_val);
 send_to_serial.concat(' ');
 send_to_serial.concat(r_val);
 send_to_serial.concat(' ');
 send_to_serial.concat(g_val);
 send_to_serial.concat(' ');
 send_to_serial.concat(b_val);

 int press_led = map(press_val,0,200,0,10);
 for(int i=0; i<10; i++)
 {
   if(i<=press_led){digitalWrite(ledPin[i],HIGH);}
   else{digitalWrite(ledPin[i],LOW);}
 }
// Serial.print(press_led); Serial.print(" "); Serial.println(press_val);

 //This is actually how Processing gets the values
 Serial.println(send_to_serial);
 delay(100); //small delay to let buffer settle and slow down draw

 //show what color is currently being drawn through the first LED
 digitalWrite(R,r_val);
 digitalWrite(G,g_val);
 digitalWrite(B,b_val);

 //reset the prev values for next loop
 prev_x = x_val;
 prev_y = y_val;
 prev_press_val = press_val;
}





This is the Processing file:


import processing.serial.*;

 Serial myPort;        // The serial port
 int xPos = 1;         // horizontal position on screen
 int yPos = 1;         // vertical position on screen

 int w = 400;
 int h = 300;

 float prev_x = random(width);
 float prev_y = random(height);

 void setup () {
 // set the window size:
 size(400, 300);      

 // List all the available serial ports
 println(Serial.list());
  myPort = new Serial(this, Serial.list()[0], 9600);
   // don't generate a serialEvent() unless you get a newline character:
   myPort.bufferUntil('\n');
   // set inital background:
   background(0);
 }

 void draw () {
 // everything happens in the serialEvent()
 }

 void serialEvent (Serial myPort) {
   // get the ASCII string:
   //We get a line that contains x y z r g b
   String inString = myPort.readStringUntil('\n');
 
   if (inString != null) {
       // trim off any whitespace:
       inString = trim(inString);
       String[] list = split(inString, ' ');
     
       int x,y,z,r,g,b;
     
       // convert to ints
       if(list.length==6)
       {
         x = int(list[0]);
         y = int(list[1]);
         z = int(list[2]);
         r = int(list[3]);
         g = int(list[4]);
         b = int(list[5]);
       }
       else
       {
         //info incorrect so skip this one
         return;
       }
     
       noFill();
       stroke(r,g,b); //we will set this color using the pressure
     
       x = int(map(x, -180,180,0,width));
       y = int(map(y, -180,180,0,height));
       line(prev_x, prev_y, x, y);
       //arc(random(width), random(height) , width, height, roll, pitch);
     
       prev_x = x;
       prev_y = y;

   }
 }




Thursday, February 28, 2013

Project 2

We were once again supposed to create a theoretical art piece and build a mock-up of it with our Arduinos.
We were supposed to use 2 sensor inputs and 2 LED outputs and Serial communication.

I wanted to use Processing this time around (Since Processing communicates with the Arduino via Serial I am counting this as my use of Serial communication.). For this project, I found myself very inspired by the following computer generated art pieces. I love the sense of chaos and yet rhythm that they have.





At the same time I thought about how I never seem to make enough time to explore my creative ideas. I am usually too wrapped up in the things that I have to do for school or work to spend much time on the grandiose ideas of my mind. So I have started daily challenging myself with this question (and I encourage you to do the same): "What have you created today?"

So I decided to make a system that would take the natural rhythm of  daily activity and express it in a generative art piece so that at the end of the day you could have automatically created a piece of art for the day. It uses an accelerometer to track your motion(maybe you would wear it on your foot or just your shirt) and a pressure sensor (maybe to detect touch or steps). My Processing program uses the accelerometer data as an (x,y) coordinate to determine where on the screen it should draw and the pressure sensor data changes the color



(Code and Video will be in next blog post)

Rock, Paper, Scissors


We had an assignment to make a rock, paper, scissors game with the RGB LED.
R beats G
G beats B
B beats R

We were to use Serial communication to play with another person in class
I played with Laura so that we could test the entire communication protocol.
I had one bug that gave me a lot of problems which was that I was not delaying long
enough when trying to receive more than one character in a row as in "GGG"
I was not giving the buffer long enough to actually receive all of the data

Here is a schematic of my arduino board for this project (These are the exact pin #'s used)


And here is my code. I used a header file to organize my code and so that I could use enumerations which seem to have a slight problem in Arduino:

//functions.h


#include "Arduino.h"

HardwareSerial& s = Serial1;

const byte R_rock = 10;
const byte G_paper = 8;
const byte B_scissors = 9;

const byte R_stat = 7;
const byte G_stat = 6;
const byte B_stat = 5;

const byte pot_pin = A8;
int pot_val = 0;

const byte switch_pin = 2;
int prev_switch_val = 0;
int switch_val = 0;

int R_val = 0;
int G_val = 0;
int B_val = 0;

int R_stat_val = 0;
int G_stat_val = 0;
int B_stat_val = 0;

int state = 0;
enum Color{ RED, GREEN, BLUE };

Color my_choice  = RED;
Color opponent_choice = RED;


void set_rps_color()
{
  pot_val = analogRead(pot_pin);    // read the potentiometer to determine color choice
 
  if(pot_val < 413)
  {
    R_val = 255;
    G_val = 0;
    B_val = 0;
  }
  else if(pot_val < 827)
  {
    R_val = 0;
    G_val = 255;
    B_val = 0;
  }
  else
  {
    R_val = 0;
    G_val = 0;
    B_val = 255;
 
  }
}

//be careful with this...not listening to this all the time...
boolean switch_pressed()
{
  prev_switch_val = switch_val;
  switch_val = digitalRead(switch_pin);
  //Serial.print(prev_switch_val);Serial.print(" ");
  //Serial.println(switch_val);
  if(prev_switch_val==0 && switch_val==1)
  {
    return true;
  }
  return false;
}

int determine_winner(enum Color me,enum Color opponent)
{
  int test = (3+((int)me-(int)opponent))%3;
  if(test == 2)
  {
    //I win
    R_stat_val = 0;
    G_stat_val = 255;
    B_stat_val = 0;
  }
  else if(test == 1)
  {
    //They win
    R_stat_val = 255;
    G_stat_val = 0;
    B_stat_val = 0;
  }
  else if(test == 0)
  {
    //tie
    R_stat_val = 175;
    G_stat_val = 255;
    B_stat_val = 0;
  }
  return test;
}

int get_opponent()
{
  //need to read 3 times and construct a string?
  if(s.available() > 0)
  {
     char incomingByte = s.read();
   
    if(incomingByte == 'R') opponent_choice = RED;
    else if(incomingByte == 'G') opponent_choice = GREEN;
    else if(incomingByte == 'B') opponent_choice = BLUE;
    else return -1;
  }
  else
  {
    return -1;
  }
 
  return int(opponent_choice);
}

int send_choice()
{
  if(R_val == 255) {s.write("R"); my_choice = RED; return 0;}
  else if(G_val == 255) {s.write("G"); my_choice = GREEN; return 1;}
  else if(B_val == 255) {s.write("B"); my_choice = BLUE; return 2;}
  else return -1;
}

void set_stat_color(int R, int G, int B)
{
  R_stat_val = R;
  G_stat_val = G;
  B_stat_val = B;
}

//
// i is 1 for the first reset  => send ZZZ
// i is 2 for the second reset => send XXX
//
int send_reset(int i)
{
  if(i==1) {s.write("ZZZ"); }
  else if(i==2) {s.write("XXX");}
  else return -1;
}

//
// i is 1 for the first reset  => listening for ZZZ
// i is 2 for the second reset => listening for XXX
//
bool listen_for_reset(int i)
{
  String inData = "   ";
  int index = 0;
  char inChar;
 
  if(i==1)
  {
    //Serial.println("Wont work without this print for some weird crazy reason");
    while(s.available() > 0)
    {
      //Serial.println("Serial data available");
       inChar = s.read();
       if(index < 3)
       {
         inData[index]=inChar;
         index++;  
       }
       delay(10);
    }
   
    //inData.trim();
    if(inData == "ZZZ" || inData == "zzz")
    {
      return true;
    }
  }
  else if(i==2)
  {
       //Serial.println("Wont work without this print for some weird crazy reason");
    while(s.available() > 0)
    {
       inChar = s.read();
       if(index < 3)
       {
         inData[index]=inChar;
         index++;  
       }
       delay(10);
    }
   
    //inData.trim();
    if(inData == "XXX" || inData == "xxx")
    {
      return true;
    }  
  }
  return false;
}


//main file


#include "functions.h"

// the setup routine runs once when you press reset:
void setup() {              
  // initialize the digital pin as an output.
  pinMode(R_rock, OUTPUT);
  pinMode(G_paper, OUTPUT);
  pinMode(B_scissors, OUTPUT);

  pinMode(R_stat, OUTPUT);
  pinMode(G_stat, OUTPUT);
  pinMode(B_stat, OUTPUT);

  pinMode(pot_pin, INPUT);
  pinMode(switch_pin, INPUT);

 s.begin(9600);
 Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
 
  switch (state){
    case 0:
            //Waiting for someone to press "reset"
            if(switch_pressed())
            {
               send_reset(1); //send the first reset signal
               set_stat_color(0,0,255); //set status to blue
               state ++; //advance state to wait for opponent
               break;
            }
            else if(listen_for_reset(1))
            { //opponent pressed reset
              set_stat_color(0,0,255); //set status color to blue
              state+=2; //advance state to wait for me to press reset
              break;
            }
            break;
    case 1:
            //waiting for opponent to press reset
            if(listen_for_reset(1))
            {
              set_stat_color(155,0,255);//set status color to magenta
              state+=2;//advance state to choose color
              break;
            }
            break;
    case 2:
            //waiting for me to press reset
            if(switch_pressed())
            {
              send_reset(1);//send the first reset signal
              set_stat_color(155,0,255);
              state++; //advance state to choose color
              break;
            }
            break;      
    case 3:
            //Allow our player to select color
            set_rps_color(); //can change color as much as we want
            if(switch_pressed()) //when done press switch
            {
              send_choice();
              set_stat_color(155,255,255);//set stat color to signify I have chosen
              state++;//advance state to wait on opponent
              break;
            }
            if(get_opponent()>=0)//also listen for opponent choice
            {
              set_stat_color(0,255,255);//set stat color to signal opp chose and is waiting on me
              state+=2;//advance state for opp to wait on me
              break;
            }
            break;
     case 4:
            //Serial.println("In case 4");
            //Wait for other player to select color
            if(get_opponent()>=0)
            {
              set_stat_color(0,255,255); //set stat color
              state+=2; //advance state to determine winner
            }
            break;
      case 5:
            //Opponent is waiting on me to choose
            set_rps_color(); //can change color as much as we want
            if(switch_pressed())
            {
              send_choice();
              set_stat_color(155,255,255);//set stat color to signify I have chosen
              state++; //advance state to determine winner
            }
            break;
      case 6:
            //determine winner
            determine_winner(my_choice,opponent_choice); //This sets the stat light color
            state++; //advance state to wait for reset
            break;
      case 7:
            //Either opponent or I must press reset to start over
            if( switch_pressed() || listen_for_reset(2))
            {
              send_reset(2); //send the second reset
             
              //Clean up
              R_stat_val = 0;
              G_stat_val = 0;
              B_stat_val = 0;
           
              R_val = 0;
              G_val = 0;
              B_val = 0;
         
              //Start back at case 0
              state = 0;
          }
  }
           
   analogWrite(R_rock,R_val);
   analogWrite(G_paper,G_val);
   analogWrite(B_scissors,B_val);
 
   analogWrite(R_stat,R_stat_val);
   analogWrite(G_stat,G_stat_val);
   analogWrite(B_stat,B_stat_val);

}


Project 1


Here is what I presented in class for Project 1:



I am quite fascinated by time. I love that there are so many different perspectives on time. It is mysterious and can be the center of so many different trains of thought. A physicist might study the rules of time and how it works, whereas a physchologist will ask, "How do humans view time? How does it affect our actions?" and a philosopher will ponder interesting puzzles such as "Does time exist if nothing is changing?"

So I made a timer with my Arduino for this assignment.


 The question then is what should I do with this timer and I came up with the following theoretical art piece. The piece that I propose was inspired by this robot that I found a video of online. He was built with full spacial awareness, but as soon as he begins to go out and explore his environment he unplugs himself. He is just a robot, he does not have feelings or care, but still I feel sorry for him. I love the irony of this idea of frustrating a machine. A machine cannot feel frustration or anything else but the viewer tends to feel the emotion for the machine anyway.


A brief explanation of my proposed art piece. I am furthermore, very intrigued ad inspired by the additional irony of the idea of a useless superpower. The idea that one could possess or be granted an ability that is special, unique, or defies physics or normal human capability, but can achieve nothing with it.


For the more practically minded, you could use the timer I created in a number of ways, but thought of its potential use in pilates class to help me monitor my breathing and keep a steady slow pace, both of which are very important to doing pilates correctly.


Here is a schematic for my circuit board (These are the exact pin numbers that I used)



And here is my code from the project:



int Switch = 2;
int Pot = 5;
int R = 10;
int G = 8;
int B = 9;
int pot_val = 0;
int switch_val = 0;
int prev_switch_val = 0;
boolean go = 1;
boolean blink = 1;

double total_time = 100000.0;
double time_left = total_time;

// the setup routine runs once when you press reset:
void setup() {              
  // initialize the digital pin as an output.
  pinMode(Pot, INPUT);
  pinMode(Switch, INPUT);
  pinMode(R, OUTPUT);
  pinMode(G, OUTPUT);
  pinMode(B, OUTPUT);

 Serial.begin(9600);
}

/*
**This function will wait the specified amount of time (relative, not in any specific metric)
**but still listens for the button press.
**Returns true immediately if button is pressed
**Otherwise returns false
*/
boolean wait(int time_out)
{
  while(time_out>0)
  {
    time_out--;
   
    prev_switch_val = switch_val;
    switch_val = digitalRead(Switch);
    if(switch_val==1 && prev_switch_val==0)
    {
      //time paused
      go = !go;
      return true;
    }
   
    //delay(1);
    delayMicroseconds(100);
  }
  return false;
}

void loop() {
  //Check and see if out time is up
  if(time_left <= 0)
  {
    Serial.println("Time's Up!");
    //Start things over (This would start the video over too)
    time_left = total_time;
    delay(1000);
  }
 
  //this part is basically waiting for a button press to unpause
  prev_switch_val = switch_val;
  switch_val = digitalRead(Switch);
  if(switch_val==1 && prev_switch_val==0)
  {
    //button was pressed, so we want to pause time
    go = !go; //boolean to pause the "time" and unpause on next press
  }
 
  //change the color of the light as time "runs out"
  //blinking according to the speed of "time"
  //but we make sure that the light is on when paused
  if(go)
  {
    pot_val = analogRead(Pot);    // read the pull down and print the value
    //This will control the speed of the blinking of the light
    //and the light should change from green to red faster
 
    //As long as this is not paused count down time
    //larger pot # = slower blink = slower time = less time elapsed
    double time_elapsed = map(pot_val,0,1023, 1000,100);
    time_left = time_left - time_elapsed;
 
    //light should be on
    if(blink){
        //change the color of the light slowly
       double c = (time_left) * (1 - .45) / (total_time)+.45;
       //red light overpowers at about c=.4 or .3 so altering this
       analogWrite(G,(c)*255);
       analogWrite(R,(1-c)*255);
       analogWrite(B,0);
     
       //wait the appropriate amount of time
       double wait_time = map(pot_val,0,1023,2000,5000);
       Serial.print(time_left);Serial.print(" ");
       Serial.print(wait_time);Serial.print(" ");
       Serial.println(c);
       wait(wait_time);
     
       //flip the blink boolean off
       blink = !blink;
    }
    else
    {
      //light is off
       analogWrite(G,0);
       analogWrite(R,0);
       analogWrite(B,0);
       //wait for proper duration
       double wait_time = map(pot_val,0,1023,2000,5000);
       wait(wait_time);
       //flip the blink boolean back on
       blink = !blink;
    }
  }
 else
  {
    //time is paused
    //make sure the light is on but doesnt blink or change color
    double c = (time_left) * (1 - .45) / (total_time)+.45;
    analogWrite(G,(c)*255);
    analogWrite(R,(1-c)*255);
    analogWrite(B,0);
   
    Serial.println("Paused");
  }
}

Tuesday, February 5, 2013

Theoretical Project

We are to create a theoretical project using the input and output devices that we have learned about so far which include LEDs, switches, and potentiometers. Last time in class I successfully created a color wheel using the potentiometer and a 3 pin RGB LED. As you turn the wheel, the resistance in the potentiometer changes and the color changes from red to yellow to green to blue-green to blue to purple and back to red. I though I would try to incorporate this exciting achievement into this project, but here is what I came up with:

I thought of creating an art piece that makes a statement on the modern commodity of time.
The idea is that there would be a self-generating art piece. For now I was thinking of this as a simple video of  a drawing or painting being created. The catch is that there is also a timer attached to this piece that counts down the time remaining, and the previously mentioned art piece never has time to finish itself. When the timer runs out, the canvas is swept blank and the piece has to start itself over (video stops short of a complete piece and repeats). No matter how long a viewer were to observe this piece, he or she would never know what the finished piece was supposed to look like. The viewer can interact with the piece by turning a dial (aka the potentiometer) to speed time up or slow time down and can even press a button to pause time all together. But these interactions are of no avail since as time speeds up, the drawing speeds up, but by relativity the art piece still only makes it to same stage of completeness as before. Similarly when time is paused, the art piece must also stop drawing. The timer is just an LED that blinks according to the speed of time set by the potentiometer dial. This LED changes from green through yellow to red as time runs out. The light is fully red when time is out and the piece must begin again.

Originally, I was trying to think of a piece that could instill a false sense of urgency in the viewer since I believe this often happens to people in life especially when involved in modern corporate America. We are all in a hurry, but what is that hurry really for other than burning away the time that we do have with stress and worry. Though related, this piece has really become a comment on my personality and the number of times that I start something that I don't finish. Too many interests, too little time. Yet for all our wishing to slow time down, we still could  not control our ability to finish something anyway.

Monday, January 28, 2013

Last Thursday in class we made our first circuit. We lit up tiny led light bulbs and were all very excited about it. We learned how to use the breadboard and resistors as well as the multimeter. We also all learned a valuable lesson about balancing the 5 volt input with the proper resistance so as to avoid blowing things up. As a person prone to accidental destruction, I am keeping my fingers crossed that I stay patient and careful and can come out of this class without breaking too many things.

Continuing the train of thought about mechanical sculptures from my last post. I found some very interesting things about kinetic art on the interwebs.


I learned that Marcel Duchamp created the first known kinetic sculpture by placing a bicycle tire on top of a stool. This type of kinetic art which is fueled by touch or wind seems very popular and I found several mesmerizing pieces. My favorites are these wind driven works of Anothony Howe:

http://www.youtube.com/watch?v=8QiOAg_Caig

I then stumbled across these digitally controlled moving art pieces. This is not exactly what I had in mind previously when thinking of mechanical art, but these are exceedingly beautiful and mesmerizing.

http://www.youtube.com/watch?v=5tCxMLjOCgc

http://www.youtube.com/watch?v=jhP9n6WvVfQ

Wednesday, January 23, 2013

Yesterday was the first day that class met. We went over all the parts and tools that we get to play with this semester and ran our first test on the Arduino boards. We got some new parts that we have to solder the pins on ourselves. I have never soldered before, and I am really excited to learn this new skill. I am a little nervous that I will be bad at it at first or mess up a lot, but I suppose that is how you learn.

Seeing all of the new toys was very exciting and definitely got me thinking about all of the cool things I could potentially create this semester.When we were going over the motors that we will be using throughout the class, Phil mentioned that the DC motor could be used, for example, to power a ballerina turning in a music box. As I have mentioned, I love dancing, and I have always liked music boxes too (probably because so many of them have ballerinas in them). So this simple statement resonated in me and especially jolted my creative mind. For some reason this train of thought led me to the vague idea of mechanical sculptures. I have never sculpted before so that part could be interesting, but I really like this idea. I will have to do some research and think about this concept some more.

Sunday, January 20, 2013

In exploring what has been done in physical computing and art with Arduino components, I found many interesting and inspiring works. Here are my favorites:

 I really like this because I like the idea of homemade arcade or casino games excites me. I like the idea of    being able to create something that is usually sought out in a very specific and somewhat exclusive environment and being able to infuse that creation with your own personal creativity. This is right up my alley
http://vimeo.com/groups/arduinoart/videos/29833767


I love dance, and with this piece I love the idea of making your own music as you dance. Normally, dancing is molded to fit and express the music, but in this scenario the dancer can control and inspire the music. Great concept!


Daniel Rozin's Mechanical Mirror series is probably the strongest piece that I have come across in terms of artistic expression. He uses a camera and many different everyday materials such as wood or even trash as pixels to reflect viewers' images back at themselves creating a psuedo mirror. These pieces make me very thoughtful about the role of pixels and computers in modern society and a loss of physicality in favor of virtuality. The message of the pieces comes across very clearly.
http://www.smoothware.com/danny/


In these two, the creativity and whimsy is superb. I think that they are really fun and definitely get me to start thinking outside of the box. I mostly like the idea of creating an object that defies social norms since I tend to be pretty defiant of these myself on a daily basis. It makes me think about making an actual gadget that serves a purpose with maybe a somewhat futuristic flare. 
Similarly whimsical, there is something that just feel very lifelike and organic about this one that I think really just makes people fall in love with it. It is not a living creature, but the way it reacts to the user makes one feel as if it has a personality and seems to draw people to it.


Also I have to add this as a bonus because as I said I love dance. I think this is just insanely creative and I am kind of obsessed with it though I do not actually know how these suits were made or controlled. I think this concept could even be explored further :
My name is Kourtney Kebodeaux.  I received my B.S. in Computer Science from Texas A&M University in 2011 and am currently pursuing my M.S. in Visualization. I am a very curious person which means that my interests generally include anything that I am given the opportunity to explore and learn about. Of course, there are a few exceptions such as statistics just as there are areas that I find exceptionally intriguing like all things computers and animation. My main goal currently is to graduate and get a job in the animation industry as a technical director. Artistically I am generally interested in somewhat surreal art. I like the idea of pushing creativity past the human experience transcending things that actually exist in the world to things that are more an amalgamation of thoughts or an expression of emotion or ideas.

My undergraduate degree in computer science gave me a lot of exposure to computer software and practice in programming, but I have been itching for some time to try my hand at hardware.I love figuring out how things work and the feeling of accomplishment that accompanies transforming an idea into an actual physical, tangible object. I'm looking forward to making some cool stuff in this physical computing class!