Start simulating free

Sketch Editor

In a Sketch project you write the program yourself in Arduino C++, exactly as in the Arduino IDE.

The editor

The sketch.ino tab holds the whole program. The editor provides:

A dot next to the tab name marks it as the editable file of the project. Changes are saved automatically.

Program structure

A sketch has the same structure as on a real board:

void setup() {
  Serial.begin(115200);
  pinMode(2, OUTPUT);
}

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

setup() runs once at start-up and loop() runs repeatedly. You can add your own functions, global variables, #include directives and #define constants anywhere in the file.

Using libraries

Add #include lines for the libraries you need. Libraries used by Circzy parts are installed during setup (LiquidCrystal I2C, Adafruit SSD1306 and GFX, DHT, Servo, ESP32Servo, Adafruit NeoPixel, MFRC522, TinyGPSPlus, RTClib and others). Install any other library from the Library Manager.

Pin names

Use the pin numbering of the board's Arduino core:

Board familyHow to write pinsExample
ArduinoNumbers, A0–A5 (A15 on Mega)pinMode(13, OUTPUT), analogRead(A0)
ESP32GPIO numberspinMode(4, OUTPUT) for D4 / IO4
ESP8266Board names or GPIO numberspinMode(D1, OUTPUT) or pinMode(5, OUTPUT)
Raspberry Pi PicoGPIO numberspinMode(15, OUTPUT) for GP15, analogRead(26) for GP26
STM32Port namespinMode(PC13, OUTPUT)

The board pages list every pin.

Compiling

Press ▶ in the simulation panel to compile and run. If the compiler finds an error, the Compilation Error panel shows the message with the line number. Fix the code and press ▶ again. See Running the Simulation.

Downloading the sketch

Open the Files panel on the left rail and click sketch.ino under Download to save the program as a file you can open in the Arduino IDE.

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