Tag Archives: lil elephant

Catman Strikes Again!

I made a simple circuit with two lightbulbs.

photo (12) photo 2

The green bulb blinks whenever the switch is not in use. The blue bulb is set off when a connection is made within the switch. In this scenario, Lil Elephant tries to warn Rubber Ducky about Catman with a secret message embedded in the blue bulb using really sloppy Morse Code. Can you guess what it is?

Catman Strikes Again

Code:

void setup(){
pinMode(7,OUTPUT);
pinMode(8,INPUT);
pinMode(3,OUTPUT);
}

void loop(){
if(digitalRead(8) == HIGH)
{
digitalWrite(3,HIGH);
delay(2000);
digitalWrite(3,LOW);
delay(300);
digitalWrite(3,HIGH);
delay(700);
digitalWrite(3,LOW);
delay(300);
digitalWrite(3,HIGH);
delay(2000);
digitalWrite(3,LOW);
delay(300);
digitalWrite(3,HIGH);
delay(700);
digitalWrite(3,LOW);
delay(300);
digitalWrite(3,HIGH);
delay(700);
digitalWrite(3,LOW);
delay(300);
digitalWrite(3,HIGH);
delay(2000);
digitalWrite(3,LOW);
delay(300);
digitalWrite(3,HIGH);
delay(2000);
digitalWrite(3,LOW);
delay(300);
}
else{
digitalWrite(7,HIGH);
delay(350);
digitalWrite(7,LOW);
delay(350);

}
}