Vidit ShahUtkarsh Tiwari
Published © GPL3+

Morse Code S.O.S. Flasher

In this project, we will make our LED flash the sequence S.O.S. over and over again.

BeginnerShowcase (no instructions)1 hour41,263
Morse Code S.O.S. Flasher

Things used in this project

Story

Read more

Schematics

Schematic

Code

S.O.S Morse Code

Arduino
int ledPin=8;

 void setup() {
  // put your setup code here, to run once:
pinMode(ledPin,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  
    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);
    
}

void flash(int duration)
{
  digitalWrite(ledPin,HIGH);
  delay(duration);
  digitalWrite(ledPin,LOW);
  delay(duration);
}

Credits

Vidit Shah
10 projects • 39 followers
Programmer
Contact
Utkarsh Tiwari
10 projects • 40 followers
Trying to FIND myself! :P Interested in DIY's and coding!
Contact

Comments

Please log in or sign up to comment.