Demo entry 6440877

sample

   

Submitted by anonymous on May 27, 2017 at 02:44
Language: C++. Code size: 570 Bytes.

*/int pin = 8;

int pause = 100;

int note = 440; // music note A4voidsetup()

{

  // no need

}

// SOS signalvoidloop()

{

  threeDots();

  threeDashes();

  threeDots();

  delay(3000);

}

// three short signalsvoid threeDots()

{

  for (int i=0; i<3; i++){

    tone(pin, note, 100);

    delay(200);

    noTone(pin);

  }

  delay(200);

}

// three long signals8void threeDashes()

{

  for (int i=0; i<3; i++){

    tone(pin, note, 300);

    delay(400);

    noTone(pin);

  }

  delay(200);

}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).