All submissions

Solving Approach

How do you plan to solve it?

 Solving Approach

How do you plan to solve it?

The anode of the LED is connected to the microcontroller, and so if we give a HIGH to the GPIO, the LED should turn on. Using delay(), we can set the LED to stay on for 400 milliseconds and the LED to stay off for 800 milliseconds. 

The value of resistance can be calculated using Ohm's law, 

5-10^-3*R-1.8=0 (applied kvl)

From this, you get R=3200 ohms.

  
 

 

 

 

Code

/*Paste your code here*/

int led=8;

void setup(){
	pinMode(led,OUTPUT);

}

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


 

 

 

 

Code

/*Paste your code here*/

 

 

 

Output

Video

Add video of the output (know more)

 

 

Photo of Output

Add a photo of your hardware showing the output.

 

 

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!