8. LED Blink

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 
 

 

 

 

Code

#define LED_PIN 5   // GPIO pin connected to LED

void setup()
{
    pinMode(LED_PIN, OUTPUT);
}

void loop()
{
    digitalWrite(LED_PIN, HIGH);  // LED ON
    delay(400);                   // 400 ms ON time

    digitalWrite(LED_PIN, LOW);   // LED OFF
    delay(800);                   // 800 ms OFF time
}


 

 

 

Output

Video

Add video of the output (know more)

 

 

Photo of Output

Add a photo of your hardware showing the output.

Was this helpful?
Upvote
Downvote