8. LED Blink

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

Set pin to OUTPUT. In a loop, turn it HIGH, wait 400ms, turn it LOW, wait 800ms. Use a ~300Ω resistor to get ~10mA current.

 
 

 

 

 

Code

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

void loop() {
  digitalWrite(3, HIGH);
  delay(400);
  digitalWrite(3, LOW);
  delay(800);

}






 

 

 

Output

Photo of Output

Add a photo of your hardware showing the output.

 

Was this helpful?
Upvote
Downvote