8. LED Blink

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 ESP-32 supply voltage: 3.3V
 Voltage drop across LED = 1.8V
 Desired current flows through LED = 10mA

Resistance R = (3.3-1.8)/(10*10^-3) = 150

Connect led and resistance in series to ground

Code

/*Paste your code here*/
// source current configuration
#define led_pin 4
void setup() {
  // put your setup code here, to run once:
  pinMode(led_pin, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(led_pin, HIGH); 
  delay(400);
  digitalWrite(led_pin, LOW);
  delay(800);
}

 

 

 

Output

Photo of Output

Add a photo of your hardware showing the output.

 

Was this helpful?
Upvote
Downvote