8. LED Blink

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 1. Configured a pin where LED cathode will be connected.(~3V)

2. Placed a resistor between GPIO pin and LED ~200 ohm.

(R=(5-3)/0.01=200ohm)

3. Ran the code in loop where LED turned on for 400ms and off for 800ms through digitalwrite and delay keywords.
 

 

 

 

Code

int ledpin=9;

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

void loop(){
	digitalWrite(ledpin,HIGH);
	delay(400);
	
	digitalWrite(ledpin,LOW);
	delay(900);
}

 

 

 

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