SD5529 Embedded Interaction Workshop Mdes Interaction Design 2010-2011
Hong Kong Polytechnic University
Thursday 17 March 2011
Wednesday 16 March 2011
coding
#include <Servo.h> // import servo control functions
Servo myservo1;
Servo myservo2;
int currentValue = 0;
int targetValue = 0;
int angleValue = 50;
void setup() {
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
//Serial.begin(9600);
myservo1.attach(9);
myservo2.attach(10);
}
void loop() {
/////////////////////////////////////////////////////////////////////////
//CALCULATE THE FINAL ANGLE
targetValue = digitalRead(5)*angleValue + digitalRead(6)*angleValue + digitalRead(7)*angleValue + 20;
/*
if(digitalRead(5)==HIGH) {
targetValue = 90;
} else if(digitalRead(5)==LOW) {
targetValue = 0;
}
*/
/////////////////////////////////////////////////////////////////////////
//DECIDE + OR -
if(currentValue<targetValue) {
currentValue = currentValue + 1;
} else if(currentValue>targetValue) {
currentValue = currentValue - 1;
}
/////////////////////////////////////////////////////////////////////////
//CHECK VALUE
// Serial.println(currentValue);
/////////////////////////////////////////////////////////////////////////
//SEND VALUE TO MOTOR
myservo1.write(currentValue);
myservo2.write(170-currentValue);
///////////////////////////////////////////////////////////////////////////
//MAKE IT NOT TOO FAST
delay(50);
}
But there is some problem that two motor can not start at the same time. It could be the problem of motor because when it is close to 0 or 179 degree, it is not accurate. We will try to use program to control it since we have already built everything.
Servo myservo1;
Servo myservo2;
int currentValue = 0;
int targetValue = 0;
int angleValue = 50;
void setup() {
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
//Serial.begin(9600);
myservo1.attach(9);
myservo2.attach(10);
}
void loop() {
/////////////////////////////////////////////////////////////////////////
//CALCULATE THE FINAL ANGLE
targetValue = digitalRead(5)*angleValue + digitalRead(6)*angleValue + digitalRead(7)*angleValue + 20;
/*
if(digitalRead(5)==HIGH) {
targetValue = 90;
} else if(digitalRead(5)==LOW) {
targetValue = 0;
}
*/
/////////////////////////////////////////////////////////////////////////
//DECIDE + OR -
if(currentValue<targetValue) {
currentValue = currentValue + 1;
} else if(currentValue>targetValue) {
currentValue = currentValue - 1;
}
/////////////////////////////////////////////////////////////////////////
//CHECK VALUE
// Serial.println(currentValue);
/////////////////////////////////////////////////////////////////////////
//SEND VALUE TO MOTOR
myservo1.write(currentValue);
myservo2.write(170-currentValue);
///////////////////////////////////////////////////////////////////////////
//MAKE IT NOT TOO FAST
delay(50);
}
But there is some problem that two motor can not start at the same time. It could be the problem of motor because when it is close to 0 or 179 degree, it is not accurate. We will try to use program to control it since we have already built everything.
Tuesday 15 March 2011
Thursday 10 March 2011
Wednesday 9 March 2011
Scenario for Sound Luna
Scenario:
Venue: Harbour City, TST, Hong Kong
Scenario 1:
-Installation of 6nos. Sound Luna stand.
-Located down the aisle of Harbour City open air pier walkway.
-Act as monumental artistic structures, with size up to 6 metres height to cause an impact
Scenario 2:
-Operation instructions will be provide on the Sound Luna stand.
-Sound Luna provides a smart phone wifi/bluetooth synchronization function.
-An LCD screen will be installed on the stand for the view of playlist.
-Pedestrians can download an app to sync their selected music video onto Sound Luna.
-Audio and video will be played on Sound Luna, with integrated sound system and The Wing projector will play the visuals.
-The playlist will be put into queues and when your selected music video is being favored by pedestrians (with LIKE function), the music video will be repeated.
Tuesday 8 March 2011
1:15 Full size model development
Fully Open
Closed
Front View
Gear ratio 1:8, power is not enough. Plan to buy a 13kg power servo motor.
Further testing Scissors Mechanism
Thursday 3 March 2011
1:15 Full size Testing
Scissors Mechanism
Attempted using 1 motor to link up two motions but failed.
We will try to operate using two motors.
Tuesday 1 March 2011
Subscribe to:
Posts (Atom)