Solving Approach

How do you plan to solve it?

 First I calculated according to the ohm's law formula I=U/R. The voltage here is minus 1.8v (voltage dissipated on the led), so the output voltage is 3.8v. I divided it by 10mA and got the resistance of 330ohm. Then I used Tinkercad to simulate. In the code, I used the delay function to solve the problem of lighting up for 400ms and turning off for 800ms. 

 

 

 

Code

/*Paste your code here*/

int led =3;

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

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

 

 

 

Output

Video

Add video of the output (know more)

 

Photo of Output

Add a photo of your hardware showing the output.

 

Upvote
Downvote

Submit Your Solution

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