Hussien Mohamed
Published

Morse Code ( S.O.S )

This an automatic morse code which can be used in different situations and projects like ( ROV, Drones ..etc )

IntermediateShowcase (no instructions)30 minutes15,966
Morse Code ( S.O.S )

Things used in this project

Story

Read more

Code

MORSE CODE (S.O.S)

C/C++
This an automatic Morse code Which can be used in different situations and projects
int ledPin = 13;
// LED connected to digital pin 13
void setup()
{
pinMode(ledPin, OUTPUT);
  
}
void flash(int duration)
{
digitalWrite(ledPin, HIGH);
delay(duration);
digitalWrite(ledPin, LOW);
delay(duration);

}

void loop()
{
flash(200); flash(200); flash(200);
// S
delay(300);
// otherwise the flashes run together*//
flash(500); flash(500); flash(500);
// O
flash(200); flash(200); flash(200);
// S
delay(1000);
// wait 1 second before we start
}

Credits

Hussien Mohamed

Hussien Mohamed

2 projects • 10 followers
Addicted to the embedded world , pro chess player , electronics engineer

Comments