# Wave_Midterm

_________________________________________________________________________________________

/ Midterm_PCOM

I and my partner Jade(Jingfei) worked together for “Wave of 2D&3D. We got inspiration from Konstantinos Mouzakis who is Designer&Maker from United Kingdom. From his work, it seems like water wave, so, we started think about from this point.

When I see this mouse, thought we can use IPAD instead of mouse. IPAD has visual and physical effects, so it might give to people much joyful feeling. Actually, I’ve been Chanel perfume No.5 Pop up event store where it exhibited around Tribeca, I saw bottom screen which has sensor. Flowers are moved from people’s hand. It was very beautiful and people really joined to play with this screen. I realized, people would like to see unexpected beautiful movement. From this art work, I would like to try to make beautiful and joyful artwork.

My partner also prefers to create artworks, so we can decided easily. At first, thinking about making decision of size of artworks, and mechanism. We knew many layers of wave and narrow distance between layer to layer will create beautiful effects but servo’s turing wing space can’t allow narrow distance. Decided to  make space between servos really tight. Another what we should think about consideration is budget and laser cutting machine size. Usually, laser cutting machine can accept maximum 12 X  24, so we couldn’t create bigger than that size.

Another concern was mechanism of layer’s legs. We spent so many times for experiment of mechanism.Another issue was, calculating currents. There are many variables of using 18 Servos.

/Below is code for Arduino

_____________________

#include <Servo.h>

int servoPin[] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};

const int servoAmount = 18;

Servo servo[servoAmount];

float servoVal[servoAmount];

int currentPos = 0;
void setup() {

Serial.begin(9600);

for(int i = 0; i < sizeof(servoPin)/sizeof(int); i++ ){

pinMode( i+2, OUTPUT );

servo[i].attach(i+2);

}

for( int i = 0; i < sizeof(servoPin)/sizeof(int)/2; i++ ){

servoVal[i] = 0.0;
servoVal[i+9]=180.0;

}

// for( int i = 0; i < sizeof(servoPin)/sizeof(int); i++ ){
//
// Serial.println(servoVal[i]);// = 0.0;
//
// }

}

void loop() {

if(Serial.available() > 0){

//currentPos = 0;

delay(5);

Serial.write(currentPos);

}
for(int i = 0; i < sizeof(servoPin)/sizeof(int); i++ ){
//servo[i].write(servoVal[i]);
//servo[currentPos].write(servoVal[i]);

if(i < sizeof(servoPin)/sizeof(int)/2){
if( i == currentPos){
lerpInput(i, servoVal[i]);
}
else{
lerpReset(i, servoVal[i]);
}
}

servo[i].write( int(servoVal[i]) );

}
delay(40);

}

// if( i == currentPos){
// lerpInput(i, servoVal[i]);
// }
// else{
// lerpReset(i, servoVal[i]);
// }

void lerpInput(int pos, float pAngle){

servoVal[pos] += 0.05 * ( 180 – pAngle );
servoVal[pos+9] = 180 – servoVal[pos];

//Serial.println(servoVal[pos+9]);

}

void lerpReset(int pos, int pAngle){

servoVal[pos] += 0.05 * ( 0 – pAngle );
servoVal[pos+9] = 180 – servoVal[pos];

}