Arduino Learning Studio

An independent Arduino learning studio

Make your first circuit come alive.

Explore an Arduino board, experiment with electronic components, and discover how code changes what happens in a circuit. Start in your browser and learn one small step at a time.

  • Beginner-friendly
  • Learn by experimenting
  • Start in your browser
void loop() {digitalWrite(13, HIGH);delay(1000);PIN 13LED · output
code → pin 13 → light

How learning works

See it. Change it. Understand it.

Guided lessons move through the same seven stages, so each new idea feels familiar. Blink an LED and Push a button are guided today; the other lessons are being upgraded one by one.

  1. 01

    Explore

    Identify the parts and what each one does.

    Find the resistor hidden inside the board.

  2. 02

    Predict

    Commit to what you expect before you test it.

    Released, does pin 2 read HIGH or LOW?

  3. 03

    Experiment

    Change one setting, run, and observe.

    Slide the delay to 2000 ms and press Run.

  4. 04

    Explain

    Connect what you saw to the idea behind it.

    Pressed button → pin reads LOW → LED on.

  5. 05

    Find the fault

    Track down a real mistake, with hints if you need them.

    Why does the LED flicker by itself?

  6. 06

    Apply

    Use the idea in a new situation.

    Make the button latch, like a stop switch.

  7. 07

    Reflect

    See what you did, not a score, and what to revisit.

    Mark the lesson complete when you are ready.

Interactive Lab

Your first experiment starts here.

Choose a lesson, change something, and watch the circuit respond.

0/13 lessons marked complete
● Saved in this browserOpen full lab ↗

Lesson 2 of 13

Blink an LED

Objective: Use digitalWrite() and delay() to switch an LED on and off at a chosen speed.

MODEL OF THIS SKETCHSTOPPEDD13 LOW
MICROCONTROLLERD13LOW · 0 VGND220 Ω+−LED A
Changing the sketch while it runs restarts the model, like re-uploading: loop() starts again.
Timing diagram (model)window 4 s
D13HIGH/LOWone loop() = 2000 ms

Stage 1 of 7 · What am I building?

Explore

You are building the classic first circuit: pin 13 switches an LED on and off. Select each part on the circuit, or below, to see what it does. Follow the current: D13 → 220 Ω → LED (+ to −) → GND.

Pick a part. 0/5 inspected.

Before you start (optional refreshers)

Pins, inputs and outputs

Each pin is configured as an input (the program reads it) or an output (the program drives it). pinMode() chooses.

setup() and loop()

setup() runs once after power-up or reset. loop() then runs again and again, as fast as its statements allow.

New ideas in this lesson

Closed circuits

Current only flows around a complete loop: from a supply, through the parts, and back to GND. Break the loop anywhere and everything in it stops.

Voltage, current and resistance

Voltage pushes, resistance restricts, current is the flow. Ohm's law ties them together: I = V ÷ R.

Current-limiting resistors

An LED barely limits its own current. A series resistor sets it: (5 V − about 2 V) ÷ 220 Ω ≈ 14 mA, safe for the LED and the pin.

Component polarity

Some parts only work one way round. An LED's longer leg (anode) goes toward the positive side; reversed, it blocks current and stays dark.

Digital HIGH and LOW

A digital pin is either HIGH (about 5 V on an Uno) or LOW (0 V). digitalWrite() sets an output; digitalRead() reports an input.

Timing and delay()

delay(ms) pauses the whole program. Nothing else happens while it waits, so a blink lasts ON delay + OFF delay.

Sequences and multiple outputs

Statements run in order, top to bottom. A pattern across several outputs is just writes and delays in the right order.

Systematic debugging

Describe the symptom, decide whether it points to the code or the wiring, check one thing at a time, then confirm the fix.

Build it for real · Arduino Uno R3

You need

  • Arduino Uno R3 (or compatible) and its USB cable
  • Breadboard and jumper wires
  • 5 mm LED (red is easiest)
  • 220 Ω resistor (red-red-brown)

Wiring

  1. D13 → 220 Ω resistor → LED long leg (anode, +).
  2. LED short leg (cathode, −, flat edge) → GND.
  3. Upload the sketch. The onboard L LED (also on D13) blinks along with yours.

Before you power up: Always include the resistor. Unplug USB while you change wiring, and check the LED's long leg faces the resistor before you plug back in.

The lab models ideal parts. Real circuits add tolerances, noise and loose wires, so check your wiring against this list before you plug in.

Sketch · read-only
// Blink an LED on pin 13
// (pin 13 → 220 Ω resistor → LED → GND)
const int ledPin = 13;

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

void loop() {
  digitalWrite(ledPin, HIGH); // LED on
  delay(1000);                // stay on for 1000 ms
  digitalWrite(ledPin, LOW);  // LED off
  delay(1000);                // stay off for 1000 ms
}

Press ▶ Run to step through the sketch line by line, in time with the circuit.

Guided simulations of real circuits. The example code is for reading and copying — nothing is compiled or sent to a board.

Learning Path · 13 lessons

From your first blink to your first project.

All 13 lessons are interactive. Pick any card to load it in the lab — each one has a guided experiment, a check question and a follow-up challenge.

Building toward robotics? See the pathway for ages 6–17 and the Rescue Rover course →

● Saved in this browser · 0/13 done

Component Explorer

Meet the parts. Understand their purpose.

↖ Long leg = + (anode)

LED

Purpose: A light that turns on when current flows through it in the right direction.

Role in a circuit: Output. The longer leg (anode) goes toward the pin, the shorter leg toward GND.

Project Ideas

Turn small experiments into something useful.

Project outline

Traffic-light sequence

Three LEDs switch in a timed order: green, amber, red. It's Blink an LED, repeated with different pins and delays.

Before you start: Blink an LED, Push a button

Project outline

Light-responsive lamp

An LED turns on automatically when the room gets dark, using a light sensor and a threshold.

Before you start: Blink an LED, Sense light

Project outline

Distance alert

An LED lights and a buzzer sounds when an object comes closer than an alert distance you choose, like a simple parking sensor.

Before you start: Read a sensor, Make a sound

Interactive project · Lesson 13

Rescue Rover capstone

A slow indoor rover crosses a marked course without touching cardboard boxes, stops when told, and is tested over five repeatable trials, with a debug record for every fault.

Before you start: Read a sensor, Steer with two motors, Sense, decide, act

FAQs

Good questions before you begin.

Do I need an Arduino board to begin?+

No. Every activity runs in your browser as a guided demonstration. When you want to build for real, each lesson lists the parts you'd need.

Do I need programming experience?+

No. Lessons start with what a sketch is and introduce one new instruction at a time, always next to a circuit that shows what it does.

What happens when I change the controls?+

Controls such as the blink delay are code settings, so the example code updates with them. Inputs like the button change what the simulated board reads, while the code that reads them stays the same.

Can I use this on a phone?+

Yes. The lab rearranges for small screens, and the virtual button works with touch.

Is my progress saved?+

Yes, in this browser only. Completed lessons and your last selected lesson are stored locally on this device. Clearing browser data or switching devices starts fresh, and you can reset progress any time.

Can the example code be used with real hardware?+

The examples follow standard Arduino functions and can be uploaded with the Arduino IDE. Physical builds need matching hardware and wiring you have checked — the browser activities are simplified demonstrations, not a guarantee your circuit is correct.

Start with one small experiment.