Total Pageviews

2010/05/20

Shine-brella



Proposal of umbrella that makes day of rain happy.

When the umbrella is shaken with LilyPad Arduino and an acceleration sensor,  MimeoLight wired for with the string of electroconductive is rhythmically blinked. Work of the fourth grader 2009.

















MimeoRight




























LilyPad Arduino Sketch
By Osamu Iwasaki  of  MechaRoboShop


///////////////////////////////////////

void setup() {
int i;
for(i=0;i<=19;i++){
pinMode(i,OUTPUT);
}
}
void gyro()
{
int i;
int g_z;
int g_y;
int g_x;


g_z=analogRead(1);
g_y=analogRead(2);
g_x=analogRead(3);


if(g_y>530){
for(i=13;i>=2;i--){


digitalWrite(i,HIGH);
delay(map(g_y,515,750,50,10));
digitalWrite(i,LOW);
delay(0);
}
}


if(g_y<470){
for(i=2;i<=13;i++){
digitalWrite(i,HIGH);
delay(map(g_y,280,485,10,50));
digitalWrite(i,LOW);
delay(0);
}
}
}
void loop( )
{
gyro( );
}
////////////////////////////////////////// 
                  

Jely Fish






Proposal of cushion that uses Breath Air(TOYOBO). The image of jelyfish was designed. Blinking similar light to breathing of sleeper is produced by using LilyPad Arduino internally.The light of five LED has branched with fiberglass. Work of the fourth grader 2009.




●Arduino sketch

int timer = 1000;

int pins[] = {
3, 5, 6, 9, 11 };

int num_pins = 5;
int Xpin = 2;
int Ypin = 3;
int Zpin = 4;
float Xin = 0;
float Yin = 0;
float Zin = 0;
float Xlebel = 0;
float Ylebel = 0;
float Zlebel = 0;

float Xfade = 0;
float Yfade = 0;
float Zfade = 0;
void setup()

{

int i;

Serial.begin(9600);
// analogReference(INTERNAL);
for (i = 0; i < num_pins; i++)
pinMode(pins[i], OUTPUT);
}/




void loop()

{

int i;

int fade;




Xin = analogRead(Xpin)/4;
Yin = analogRead(Ypin)/4;
Zin = analogRead(Zpin)/4;

Serial.print(Xin);
Serial.print(";");
Serial.print(Yin);
Serial.print(";");
Serial.print(Zin);
Serial.print(";");


Xlebel = Xin/256;
Ylebel = Yin/256;
Zlebel = Zin/256;

Xfade = Xlebel;
Yfade = Ylebel;
Zfade = Zlebel;


for ( fade = 1 ; fade <= 255 ; fade ++ ){

analogWrite( 3, Xfade );
analogWrite( 5, Yfade );
analogWrite( 6, Zfade );

analogWrite( 9, fade );
analogWrite(11, fade );

Xfade = Xfade + Xlebel;
Yfade = Yfade + Ylebel;
Zfade = Zfade + Zlebel;

delay(510/fade);
}


for ( fade = 255 ; fade >= 1 ; fade -- ){

analogWrite( 3, Xfade );
analogWrite( 5, Yfade );
analogWrite( 6, Zfade );
analogWrite( 9, fade );
analogWrite(11, fade );

Xfade = Xfade - Xlebel;
Yfade = Yfade - Ylebel;
Zfade = Zfade - Zlebel;

delay(510/fade);
}

delay(1000);
}