void setup()
{
pinMode( 0 , INPUT);
pinMode( 1 , OUTPUT);
pinMode( 1 , OUTPUT);
pinMode( 2 , OUTPUT);
analogWrite(1 , 150);
delay( 300 );
digitalWrite( 1 , LOW );
delay( 300 );
analogWrite(1 , 150);
delay( 300 );
digitalWrite( 1 , LOW );
delay( 300 );
}
void loop()
{
if (digitalRead(0))
{
analogWrite(1 , 150);
digitalWrite( 2 , HIGH );
delay( 900 );
digitalWrite( 1 , LOW );
digitalWrite( 2 , LOW );
}
delay( 2 );
}