Arduino board has an onboard LED, which is connected to the pin 13. Every time an HIGH signal is sent to pin 13 the LED turn on. If a LOW signal his sent to the pin 13, the led is turn off.
In order to reproduce the SOS signal, the following light pattern must be followed:
3 short blinks
3 long blinks
3 short blinks
Example how the signal might look like. The duration of each blink doesn't have to match exactly the one from the video, but it should be
In order to be able to change the state from pin 13 to HIGH and LOW, first it necessary to use the pinMode() function to set the purpose of the pin. In this case it would be OUTPUT, so we can write values in the pin. This should be coded inside the setup() function.
To blink a LED it is necessary to change the values from HIGH to LOW using the function digitalWrite(). The digitalWrite() function takes 2 parameters. The first one is the pin number and the second one is the value to write (HIGH or LOW).
To assure the LED is turn on or off enough time use the function delay() to wait any number of milliseconds. Set the number of milliseconds as the parameter of the function.