Start here · 02 / 16

LED Blink: HIGH, LOW & Delay

Run an Arduino LED blink experiment. Compare 500 ms and 1000 ms delays, follow D13, and calculate the full on-off cycle.

5 minBeginner
What you’ll learn

Use HIGH, LOW and a delay to set a rhythm.

Understand it

A delay pauses this example before the next change. On-time plus off-time is one cycle. A 1000 ms on-time and a 500 ms off-time gives a 1.5 second cycle. The external LED needs a series resistor.

Your experiment

Run with 500 ms on and 500 ms off. Change only the on-time to 1000 ms and count the duration of a full cycle.

Connections

  • D13 — Resistor → LED +
  • GND — LED −

Sketch

This sketch illustrates the hardware logic. The workbench runs its corresponding teaching model, not a C++ compiler.

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

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

Quick check

With 1000 ms on and 500 ms off, how long is one cycle?

Show explanation

1500 ms. A cycle includes both the illuminated phase and the dark phase; the on-time alone is not the period.

Go beyond the experiment

Connect the experiment with the fundamentals · Help & FAQ