Monday, April 5, 2010

Hooo

Thursday, March 25, 2010

v01


SIDE VIEW OF ONE MODULE
using one servo as a rotor
and RFID to identify person with different breathing rate


BOTTOM VIEW WITH LIGHTS




recording

Program Script

#include

Servo myservo;
int r;
float servoValMin;
float servoValMax;
float servoCurVal;
long timerServo;
int servoDirection = 1;

long counter;
boolean buttonReading = false;

void setup () {
Serial.begin(9600);
myservo.attach(9);
pinMode(11, INPUT);
pinMode(12, INPUT);
pinMode(13, INPUT);

myservo.write(90); // 90 -> no motion
servoCurVal = 90;

pinMode(3, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}


void loop() {

rfidReading(digitalRead(11), digitalRead(12), digitalRead(13));


//-------------------------------------- MOTOR
if(r==0) {
//myservo.write(90);
timerServo = millis();
} else if(r==2) {
servoValMin = 90;
servoValMax = 95;
} else if(r==4) {
servoValMin = 90;
servoValMax = 100;
} else if(r==6) {
servoValMin = 90;
servoValMax = 105;
}


if(millis()>timerServo) {
if(r==0) {
servoCurVal = servoCurVal - 0.05;
if(servoCurVal<=90) { servoCurVal = 90; } } else if(r!=0) { servoCurVal = servoCurVal + 0.05*servoDirection; if(servoCurValservoValMax) {
servoCurVal = servoValMax;
servoDirection = -1;
}
}

myservo.write(servoCurVal);

timerServo = millis() + 10;
}

//Serial.println(r);



//-------------------------------------LED
if(r==0) {
digitalWrite (3, LOW);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
counter = 0;

} else if(r!=0) {
//-----LED script
Serial.println(counter);

digitalWrite (3, HIGH);
//if (buttonReading==HIGH){
counter = counter+1;
if (counter > 1000) {
digitalWrite (6, HIGH);
}
if (counter > 2000) {
digitalWrite (5, HIGH);
}
/*
} else {
digitalWrite (3, buttonReading);
digitalWrite (5, buttonReading);
digitalWrite (6, buttonReading);
counter = 0;
}
*/
}

}




void rfidReading(boolean p0, boolean p1, boolean p2) {
if (p0==false && p1==false && p2==false) {
r=0;
}
if (p0==true && p1==false && p2==false) {
r=1;
}
if (p0==false && p1==true && p2==false) {
r=2;
}
if (p0==false && p1==false && p2==true) {
r=3;
}
if (p0==true && p1==false && p2==true) {
r=4;
}
if (p0==true && p1==true && p2==false) {
r=5;
}
if (p0==false && p1==true && p2==true) {
r=6;
}
if (p0==true && p1==true && p2==true) {
r=7;
}
}

*) thank u lawrence :)

Sunday, March 21, 2010

New Alternative




New Mechanic Structure Alternative

Thursday, March 18, 2010

2nd Model



hexagon motor structure

using angle wheel


we will combine this hexagon with our 1st model
to create a movement like a jellyfish leg.


LED testing

Tuesday, March 16, 2010

1st model



We plan to put LED on the tip of the tentacle.

A. Tentacles with same length

B. Tentacles with different length



Photobucket
The structure

A. with 1 wheel



B. with 2 wheels

A. 1 wheel



B. 2 wheels


Tentacle color choice

Thursday, March 11, 2010

Exploration

S I T E
Tung Wah Group of Hospital
Hong Kong




M A T E R I A L

(1) segmented plastic straw
(3) wire protection tube


M E C H A N I C A L _ S T R U C T U R E _ 0 1


with material 01


with material 03


M E C H A N I C A L _ S T R U C T U R E _ 0 2

Irregular path generates motivation and the legs will move up and down.

FEEDBACK :
1. Material 01, M Structure 01 combine with irregular straight wheel (A1)
2. Figure out how the growth process (longer sitting time)
3. Make a diagram of the movement in the field