Skip to content

Instantly share code, notes, and snippets.

@baojie
Created January 5, 2013 08:06
Show Gist options
  • Save baojie/4460456 to your computer and use it in GitHub Desktop.
Save baojie/4460456 to your computer and use it in GitHub Desktop.
int pin = 13;
void setup()
{
pinMode(pin, OUTPUT);
}
void loop()
{
// SOS
dot(); dot(); dot();
dash(); dash(); dash();
dot(); dot(); dot();
delay(3000);
}
void dot()
{
digitalWrite(pin, HIGH);
delay(500);
digitalWrite(pin, LOW);
delay(100);
}
void dash()
{
digitalWrite(pin, HIGH);
delay(1000);
digitalWrite(pin, LOW);
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment