Introduction: SOS Signal With an Arduino

Picture of SOS Signal With an Arduino

For this instructable you will learn how to create a S.O.S singnal using a LED and arduino.
This project is perfect for bigginers (like me)
This is my first instructable and first arduino project so feel free to improve some stuff (like the programming) and correct me.

Step 1: Gather Your Parts

Picture of Gather Your Parts

For this project you will need:
An Arduino (i have a duemilanove) Cost about 30 dollars
An LED (if you have the arduino that i have you can use the on board LED on pin 13) Cost about 2 dollars 
A USB cable (for the arduino DUHHHH)

The tools that need are:
a Brain :) ,the most powerfull tool of all time

Step 2: Learn a Bit of Morse Code

Picture of Learn a Bit of Morse Code

First you need to learn a bit of Morse Code (to id the S and O)
-first of all a O reprents 3 long flashes
-secondly when you add a new letter thiere will be a 3 second delay
-thirdly a S is 3 short flashes

Step 3: Connecting Up Stuff and Uploading

Picture of Connecting Up Stuff and Uploading

Connect the usb to your arduino and cannect the led to pin 12 (13 if your using the on board led)
Than when your done that copy and paste the sketch
// This sketch will allow cause a led to do a SOS signal

int ledPin =  12;    // LED connected to digital pin 12

// The setup() method runs once, when the sketch starts

void setup()   {               
 
  pinMode(ledPin, OUTPUT);
}

void loop()                    
{
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(3000);                // 3 second delay wich acts 1: before loop to make sure your ready and 2: act as a delay for when it starts all over again :)
  digitalWrite(ledPin, HIGH);   //"S" signal starts after the one second delay
  delay(1000);                 
  digitalWrite(ledPin, LOW);   
  delay(500);  
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(500);
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(3000);                  //3 second delay for the second letter (fisrt of 2)
  digitalWrite(ledPin, HIGH);
  delay(3000);                  // First dash of 3 wich represents the O
  digitalWrite(ledPin, LOW);
  delay(500);
  digitalWrite(ledPin, HIGH);
  delay(3000);
  digitalWrite(ledPin, LOW);
  delay(500);
  digitalWrite(ledPin, HIGH);
  delay(3000);                  
  digitalWrite(ledPin, LOW);
  delay(3000);                  //second 3 second delay for the third letter
  digitalWrite(ledPin, HIGH);  
  delay(1000);                 
  digitalWrite(ledPin, LOW);   
  delay(500);  
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(500);
  digitalWrite(ledPin, HIGH);
}

  
 

Step 4: ....And Enjoy!!

Picture of ....And Enjoy!!

I hope you liked this instructable :)

Comments

JoburgJim (author)2017-04-30

That's not an SOS signal. It's an S followed by an O followed by another S. In Morse Code, an SOS is a prosign: a series of dots and dashes that mean something. The SOS emergency prosign is ...---... with no gaps. So although it's the same dots and dashes that make up an S, an O and another S, it's not the same as S(gap)O(gap)S as discrete letters. You could send VTB with no gaps and have the same signal. Can't write it here but SOS should have a line above it to denote a prosign, not an S(gap)O(gap)S as discrete letters.

BrunoG (author)2010-03-31

I live in Argentina and 1 led costs about 1 peso (about  38cents in the USA).

scratchndent (author)BrunoG2017-02-14

handy

theoriginalrage made it! (author)2016-03-26

I'm using your code for a laser project I'm working on. Your code is loaded on the Uno on the bottom right, and instead of an LED it's turning on and off a laser, which is pointed at an LDR connected to the other Uno on the left that is turning the blue LED on and off based on it's values.

awesome, sounds cool

Asik (author)2016-05-24

It is a short code and more convenient to adjust !

// This sketch will allow cause a led to do a SOS signal

int ledPin = 5; // LED connected to digital pin 12

int s = 300; // 0,3 second delay for 'S' letter

int o = 800; // 0,8 second delay for 'O' letter

int pause = 100; // 0,1 second delay between letters

void setup() {

// put your setup code here, to run once:

pinMode(ledPin, OUTPUT);

}

void character(int speed, int pause) {

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

digitalWrite(ledPin, HIGH);

delay(speed);

digitalWrite(ledPin, LOW);

delay(300);

}

delay(pause); //delay between letters

}

void loop() {

character(s,pause);

character(o,pause);

character(s,pause);

delay(2000); //2 seconds delay for after the word SOS

}

geniusbomberman (author)2010-02-26

 you paid two dollars for an LED?

D5quar3 (author)geniusbomberman2010-03-28

 I've paid $2.79 for 1 LED

boghy933. (author)D5quar32014-11-14

I paid 3$ for arduino nano, lol. I saw on amazon 100 led's for 2$...

it was pack three leds that were bipolar

i would never pay 2 dollars 1 led :)

Vaidotas (author)2012-04-16

Too difficult sketch. Let's try my guide for SOS signal with speaker and LED ;)
https://www.instructables.com/id/EWOQX31H0OJ0WDP/?ALLSTEPS

leotcol (author)2010-04-02

The only thing this instructable is missing is a circuit diagram. I know its very basic but learners are learners.

Good instructable.

About This Instructable

23,463views

5favorites

License:

More by arduino=awsome:SOS signal with an arduino
Add instructable to: