Example Code for Arduino-SOS Beacon

Last revision 2026/01/08

This article offers a comprehensive guide on how to set up an Arduino SOS beacon, including hardware preparation, software configuration, wiring diagrams, and sample code for programming the SOS signal using LED lights.

Wiring Diagram

The connection diagram is the same with Blinknig a LED tutorial.

Sample Code

/*
 # Description:
 # Send SOS Beacon by led
*/
int ledPin = 10;
void setup() {
        pinMode(ledPin, OUTPUT);
}
void loop() {

      // S(...) three dot
       for(int x=0;x<3;x++){
        digitalWrite(ledPin,HIGH);
        delay(150);
        digitalWrite(ledPin,LOW);
        delay(100);
        }


        delay(100);
      // O(---) three dash
       for(int x=0;x<3;x++){
        digitalWrite(ledPin,HIGH);
        delay(400);
        digitalWrite(ledPin,LOW);
        delay(100);
        }

        delay(100);

      //S(...) three dot
       for(int x=0;x<3;x++){
        digitalWrite(ledPin,HIGH);
        delay(150);
        digitalWrite(ledPin,LOW);
        delay(100);
        }

        delay(5000);
}

Was this article helpful?

ON THIS PAGE

TOP