SOS Anna & Alba is an arduino code capable of switching on and off a LED with Morse code
Here's how you can make bold and italic text.
Here I'm going to explain the intructions of the Morse code:
Here's how the Morse code works:
Here's how the Morse code woeks with arduino programming lenguage:
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
//S
digitalWrite(13, HIGH);//turn on the light
delay(200); // Wait for 200 millisecond(s)= a dot
digitalWrite(13, LOW);//turn on the light
delay(200); // Wait for 200 millisecond(s)off
digitalWrite(13, HIGH);//turn on the light
delay(200); // Wait for 200 millisecond(s)a dot
digitalWrite(13, LOW);//turn on the light
delay(200); // Wait for 200 millisecond(s)off
digitalWrite(13, HIGH);//turn on the light
delay(200); // Wait for 200 millisecond(s)a dot
digitalWrite(13, LOW);//turn on the light
delay(600); // Wait for 200 millisecond(s)off
//O
digitalWrite(13, HIGH);//turn on the light
delay(600); // Wait for 600 millisecond(s)= a dash
digitalWrite(13, LOW);//turn on the light
delay(600); // Wait for 600 millisecond(s)off
digitalWrite(13, HIGH);//turn on the light
delay(600); // Wait for 600 millisecond(s)a dot
digitalWrite(13, LOW);//turn on the light
delay(600); // Wait for 600 millisecond(s)off
digitalWrite(13, HIGH);//turn on the light
delay(600); // Wait for 600 millisecond(s)a dot
digitalWrite(13, LOW);//turn on the light
delay(600); // Wait for 600 millisecond(s)off
//S
digitalWrite(13, HIGH);//turn on the light
delay(200); // Wait for 200 millisecond(s)= a dot
digitalWrite(13, LOW);//turn on the light
delay(200); // Wait for 200 millisecond(s)off
digitalWrite(13, HIGH);//turn on the light
delay(200); // Wait for 200 millisecond(s)a dot
digitalWrite(13, LOW);//turn on the light
delay(200); // Wait for 200 millisecond(s)off
digitalWrite(13, HIGH);//turn on the light
delay(200); // Wait for 200 millisecond(s)a dot
digitalWrite(13, LOW);//turn on the light
delay(200); // Wait for 200 millisecond(s)off
//space between words is seven times a dot
delay(1400);//Wait for 1400 millisecond(s)= seven dots
}