SOS Marina 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 works with arduino programming language:
void setup()
{
pinMode(13, OUTPUT);
}
void loop(){
delay (600);
//S
digitalWrite(13, HIGH);//turn on the light
delay(200); // Wait for 200 millisecond(s)= a dot
digitalWrite(13, LOW);//turn off 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 off 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 off 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 off 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 off 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 off 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 off 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 off 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 off 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
}
//M
digitalWrite(13, HIGH);//turn on the light
delay(600); // Wait for 600 millisecond(s)= a dot
digitalWrite(13, LOW);//turn off the light
delay(600); // Wait for 600 millisecond(s)off
delay(600); // Wait for 600 millisecond(s)= a dot
digitalWrite(13, LOW);//turn off the light
delay(600); // Wait for 600 millisecond(s)off
//A
digitalWrite(13,HIGH);//turn on the light
delay(200);// Wait for 200 millisecond(s)= a dot
digitalWrite(13,LOW);//turn off the light
delay(200);// Wait for 200 millisecond(s) off
delay(600);//Wait for 600 millisecond(s)= a dot
digitalWrite(13, LOW);// turn off the light
delay(600);// Wait for 600 millisecond(s) off
//R
digitalWrite(13,HIGH);//turn on the light
delay(200);// Wait for 200 millisecond(s)= a dot
digitalWrite(13,LOW);//turn off the light
delay(200);// Wait for 200 millisecond(s)off
delay(600); // Wait for 600 millisecond(s)= a dot
digitalWrite(13,LOW);//turn off the light
delay(600); // Wait for 600 millisecond(s)off
delay(200);// Wait for 200 millisecond(s)= a dot
digitalWrite(13,HIGH);//turn off the light
delay(200);// Wait for 200 millisecond(s)off
//I
digitalWrite(13,HIGH);//turn on the light
delay(200);// Wait for 200 millisecond(s)= a dot
digitalWrite(13,LOW);//turn off the light
delay(200);// Wait for 200 millisecond(s)=off
digitalWrite(13,LOW);//turn on the light
delay(200);// Wait for 200 millisecond(s)= a dot
digitalWrite(13,LOW);//turn off the light
delay(200);// Wait for 200 millisecond(s)=off
//N
digitalWrite(13,HIGH);//turn off the light
delay(600);// Wait for 200 millisecond(s)off
digitalWrite(13,LOW);//turn off the light
delay(600); // Wait for 600 millisecond(s)off
digitalWrite(13,HIGH);//turn on the light
delay(200);// Wait for 200 millisecond(s)= a dot
digitalWrite(13,LOW);//turn off the light
delay(600);// Wait for 200 millisecond(s)=off
//A
digitalWrite(13,HIGH);//turn on the light
delay(200);// Wait for 200 millisecond(s)= a dot
digitalWrite(13,LOW);//turn off the light
delay(200);// Wait for 200 millisecond(s) off
delay(600);//Wait for 600 millisecond(s)= a dot
digitalWrite(13, LOW);// turn off the light
delay(600);// Wait for 600 millisecond(s) off
}
To learn more HTML/CSS, check out these tutorials!