Your First Simulation
In this tutorial you build the "Hello World" of electronics: an LED that blinks once per second. You will do it twice, first with blocks and then with code.
Before you start
Open Circzy at creator.circzy.com and sign in with your Google account. There is nothing to install. If you use the offline version, make sure both the Circzy Server and Circzy App windows are open.
Part 1: Blink with blocks
1. Create the project
- On the home page, find Arduino Uno and click Start Simulation.
- Choose Blocks in the dialog.
The workspace opens with an empty Arduino Uno. The block editor is on the left and the simulation canvas is on the right.
2. Add an LED and a resistor
- Click the blue + button at the top left of the simulation panel.
- Type
ledin the search box and click LED. It appears on the canvas. - Search for
resistorand click Resistor. - Drag the parts to a free spot next to the Uno.
3. Wire the circuit
Wires are drawn by clicking pins:
- Click pin 13 on the Uno, then click one leg of the resistor.
- Click the other leg of the resistor, then the LED anode (A, the longer leg).
- Click the LED cathode (C), then a GND pin on the Uno.
Circzy picks wire colors automatically (black for ground, red for power). With a wire selected, press 0–9 to change its color.
4. Build the program
- Open Built-in › Control in the block toolbox and drag when Arduino Uno loops into the workspace.
- Open Arduino Uno › Digital Pins and drag set pin 2 to ON into when Arduino Uno loops, then change the pin to 13.
- From Built-in › Control, drag wait 1000 milliseconds below it.
- Add another set pin 13 to OFF and another wait 1000 milliseconds.
Your loop now turns the LED on, waits one second, turns it off and waits again.
5. Run it
Press the green ▶ button on the simulation panel. The status changes to Compiling... and then Running, and the LED starts blinking. Press ■ to stop.
Part 2: Blink with code
- Go back to the home page (house icon, top right) and start a new Arduino Uno project, this time choosing Sketch.
- Add the LED and resistor and wire them as before.
- Replace the code in
sketch.inowith:
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
- Press ▶. The result is the same blinking LED.
What's next?
- Print values with
Serial.println()and read them in the Serial Monitor. - Add a button and read it with if button on pin … is pressed or
digitalRead(). - Browse the Example Projects for complete circuits.
- Learn every editing trick in the Circuit Editor guide.
Ready to try it?
Sign in with Google, pick a board and run your first simulation in two minutes. Free during the launch period.
Start simulating free