Submit

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.

Run this experiment →
Independently modeled teaching circuit with detailed connectors, pins, chip and component wiring

Why it’s here

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

How it works

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.

Try it

  1. Open this experiment
  2. 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 −

Example sketch

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

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

Check your understanding

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

Show the answer

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

Sources

Arduino Uno R3 ↗ · Language reference ↗

MAKE A THOUGHTFUL CHOICE

Your shortlist, side by side.

Pricing models are indicative. Check each official website for current plans and limits.