Solving Approach

How do you plan to solve it?

 
 

 i usually separate this kind of problems in two: Hardware and  firmware 

Hardware: Let´s find the resistance value that allows a 10mA flowing through the LED

Vin = 5v, Vd = 1.8v   ---->     Vr = 5v - 1.8v = 3.2v

R = Vr / Ir  = 3.2v / 10mA = 320 ohms  -----> 330 ohms

 

 

Code



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

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

 

 

 

Output

Video

https://wokwi.com/projects/new/arduino-uno

 

 

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!