Skip to main content

LDR WITH ARDUINO

LED Fade Thumbnail

🔰 Introduction​

Learn how to build the classic LED Blink project using Arduino UNO or ESP32. This project helps beginners understand how digital output works on microcontrollers.


🔧 Components Needed​

ComponentQuantityNotes
Arduino UNO or ESP321Any compatible board
LED1Any color
Resistor1220Ω recommended
Breadboard1Optional but helpful
Jumper Wires3–4

📷 Circuit Diagram​

Circuit Diagram

🧩 Schematic Diagram​

Schematic Diagram

🛠️ Wiring Instructions​

  1. Insert the LED into the breadboard.
  2. Connect a resistor to the long leg (anode) of the LED.
  3. Connect the other end of the resistor to digital pin 13.
  4. Connect the short leg (cathode) of the LED to GND.
  5. Plug the Arduino or ESP32 into your PC via USB.

🧾 Arduino Code​

arduino-led-blink.ino
void setup() {
pinMode(13, OUTPUT);
}

void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}


Comments​