A simple beginner-friendly Arduino project to blink an LED using digital output. This project demonstrates how to configure a GPIO pin as OUTPUT and toggle it using digitalWrite() with delays.
This project blinks an LED connected to an Arduino board at a fixed interval (600 ms ON / 600 ms OFF). It is one of the most basic and important starter projects for learning embedded systems and microcontroller GPIO control.
- Arduino Board (Uno / Nano / Mega / etc.)
- LED (if not using onboard LED)
- 220Ω Resistor (for external LED)
- Jumper Wires
- Breadboard (optional)
If your board supports onboard LED on the selected pin, no external wiring is required.
| Arduino Pin | Component |
|---|---|
| Pin 2 | LED Anode (+) |
| GND | LED Cathode (–) via 220Ω resistor |
#define LED 2
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(600);
digitalWrite(LED, LOW);
delay(600);
}#define LED 2→ assigns GPIO pin 2 as LED pinpinMode(LED, OUTPUT)→ sets the pin as outputdigitalWrite(HIGH)→ turns LED ONdigitalWrite(LOW)→ turns LED OFFdelay(600)→ waits 600 milliseconds between states
Blink Timing:
- ON Time = 600 ms
- OFF Time = 600 ms
- Total Cycle = 1.2 seconds
- Open Arduino IDE
- Select your board and COM port
- Paste the code
- Click Upload
- Observe LED blinking
- GPIO Output control
- Using
pinMode()anddigitalWrite() - Understanding delays and timing
- Basic embedded programming concept
Bishnupriya
/image.png)