Skip to content
Circuitera
Products
Explore products →Arduino IDEWrite, compile, and upload.SimulatorBuild and test supported circuits.DotAsk with code and circuit context.TerminalGeneral-purpose browser coding.Serial ToolsMonitor and visualize device output.
Projects
Boards
Explore boards →Arduino Uno R3Arduino Nano V3Arduino Mega 2560Arduino LeonardoArduino MicroArduino Pro Mini
Education
Resources
Explore resources →BlogProjects HubBoardsLibrariesHelpGuides
PricingAbout
Open IDE ↗
Circuitera/Projects/Arduino Blink

Arduino Blink

Make an LED blink, then change its rhythm. Learn how setup(), loop(), digitalWrite(), and delay() control a real output.

Open in Circuitera ↗Launch in Simulator →
Arduino Blink: the matching Arduino Uno circuit rendered in Circuitera’s simulator
Matching Circuitera simulator circuit. Real firmware capture; modeled components are idealized.

Beginner · About 15 min

Arduino Uno R3 · 3 circuit components

What you need

  • Arduino Uno R3 (or classic Nano / Mega 2560 for hardware)
  • USB data cable
  • LED and 220 Ω resistor
  • Breadboard and jumper wires

Each launch creates a new sketch. Existing work is preserved. Simulation uses Uno; select your exact board for hardware.

Open in Circuitera ↗Launch in Simulator →

Wire it up

Disconnect power before changing connections. Follow terminal names rather than wire colors.

FromToWhy it matters
D13220 Ω resistorSeries current limiting
ResistorLED anode (+)Long lead on a typical LED
LED cathode (−)GNDShort lead / flat side on a typical LED

The complete sketch

blink.ino
const int ledPin = 13;

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

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

The launch buttons use this same code and a matching saved circuit.

Build it step by step

  1. Connect the LED

    With USB unplugged, connect D13 through the 220 Ω resistor to the LED anode, then connect its cathode to GND. The resistor must stay in series.

  2. Open the sketch

    Open in Circuitera creates a new Uno sketch. For a physical Nano or Mega, select its exact profile before verifying.

  3. Verify, connect, upload

    Choose Verify. After a successful build, use Connect board, grant Web Serial permission, and Upload.

  4. Change the rhythm

    Try 250 ms for the on interval and 1000 ms for the off interval. Verify and upload again, or run the edited sketch in the simulator.

Understand the sketch

One-time setup

pinMode selects output mode once. ledPin names the pin so the code and wiring are easy to compare.

A repeating cycle

loop repeats forever. HIGH drives the output high; LOW drives it low. delay uses milliseconds and blocks the sketch during each wait.

Current and polarity

Current flows from the high output through the resistor and LED to ground. The resistor limits current; an LED works in one direction. The onboard LED can also blink without an external circuit.

If something is different

Nothing lights

Check LED polarity, the ground connection, D13, and whether the correct sketch was uploaded.

The LED stays on

Confirm both digitalWrite calls are present and that the uploaded program matches the editor.

Upload fails

Check the data cable, board/bootloader selection, port permission, and other programs using the port. A compile error is a separate problem.

Expected output and tested scope

The LED alternates on and off at the programmed intervals. Changing a delay changes the rhythm.

Version 1 · Last source- and build-matched test: 2026-10-25. Actual shipped AVR-GCC WASM compilation and Uno AVR engine execution; no physical hardware test.

Supported tutorial target: Arduino Uno R3 / ATmega328P. Compile: PASS · Modeled execution: PASS. Other boards require a separate review of pins, voltage, libraries and the exact build profile.

Uno R3 pinout and limits →Arduino core APIs and library catalog →How this project was tested →

Keep exploring.

Button-controlled LED →PWM LED Fade →Arduino Uno R3 →Arduino IDE →Simulator →
Open in Circuitera ↗Launch in Simulator →
Circuitera

A little less setup.
A little more making.

Arduino IDESimulatorDotTerminalSerial Tools
BlogProjects HubBoardsLibrariesHelpGuidesEducationPricingAbout

Circuitera is an independent project and is not affiliated with Arduino. Arduino is a trademark of Arduino SA. Local sketches belong to your browser: export a backup before clearing site data.