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