Skip to content

Reference ​

Tabs, keys, settings, parts, simulator coverage and file locations for Circuit Lab 1.0.0.

Tabs ​

TabWhat it is for
LabsThe course for your board, your progress, the parts on your bench and the board tour
ProjectsThe 88-project library, your own projects, Import and New project
DatasheetYour board in plain words: figures, pin map, 3D model and rules
PlaygroundCommon parts wired to your board, for any sketch
PartsWhat you own, what you want to build, and the parts to order
SettingsColours, text size, board, currency and your prices

On a narrow screen the tab bar at the bottom has room for five. Settings then opens from the gear at the top of the Labs tab.

Keyboard ​

KeysIn a project
Ctrl + EnterRun or stop the sketch
F5Run or stop the sketch
EnterSend the line typed in the serial monitor

In the code editor, Enter keeps the indentation of the line above, and indents one step more after an opening brace {.

Settings ​

SettingChoices
ColoursMatch my device (the default), Light: drafting paper or Dark: blueprint
Text sizeSmall, Normal, Large or Extra large, for every screen
Your boardOne of the eight boards. The course, the library and the playground follow it.
CurrencyA Symbol, and what 1 US dollar equals in it. Select Apply.
Your pricesThe parts you have priced yourself; Use estimates again clears them
KeyboardThe shortcuts above

The app does not look up exchange rates. Set the rate yourself.

Parts ​

The designer has 21 kinds of part. The second column is the real part the parts list suggests.

In the designerReal partPin
LEDLED, 5 mm, with a 220 Ω resistorOutput. PWM dims it.
Push buttonPush button, tactileInput with INPUT_PULLUP; LOW while pressed
Knob (potentiometer)Potentiometer, 10 kΩAnalog input
BuzzerPassive buzzerOutput, played with tone()
Light sensorLight sensor (LDR) with a 10 kΩ resistorAnalog input; more light reads higher
Slide switchSlide switchInput with INPUT_PULLUP; LOW when on
Relay moduleRelay module, 1 channelOutput
Temperature sensorTemperature sensor TMP36Analog input
Servo motorMicro servo SG90Output, with Servo.h, or ESP32Servo.h on ESP32 boards
Distance sensorUltrasonic sensor HC-SR04Two pins: TRIG out, ECHO in, read with pulseIn()
Motion sensor (PIR)Motion sensor (PIR) HC-SR501Input; HIGH on motion
Touch sensorTouch sensor TTP223Input; HIGH while touched
Tilt switchTilt switchInput with INPUT_PULLUP; LOW when tilted
Door sensor (reed switch)Reed switch and magnetInput with INPUT_PULLUP; LOW when the door is shut
Obstacle sensor (IR)Obstacle sensor (IR)Input; LOW when something is in front
Soil moisture sensorSoil moisture sensorAnalog input; drier reads higher
Water level sensorWater level sensorAnalog input; more water reads higher
Gas sensorGas and smoke sensor MQ-2Analog input; a 5 V module
Sound sensorSound sensor moduleAnalog input
DC motorDC motor with driver moduleOutput through the driver module, never straight from a pin. PWM sets the speed.
Laser moduleLaser moduleOutput. Never point it at eyes.

Every project also needs the board and its cable, and a project with parts needs a breadboard and jumper wires. Wiring, worked out for you in the designer, and the build sheet, say where the power and ground wires go.

What the simulator covers ​

FeatureIn the simulator
Digital output and input, pull-upsSimulated
PWM brightness (analogWrite), on each board's own PWM pinsSimulated
Analog input at each board's own resolutionSimulated
Serial print and serial inputSimulated
tone() on a buzzerShown, not played
Servo (attach, write, read) and ultrasonic distance (pulseIn)Simulated
Relay, slide switch, TMP36 temperature sensorSimulated
millis, delay and non-blocking timingSimulated
Wi-Fi and BluetoothReal board only
I2C and SPI devices and displaysReal board only
Other libraries, structs, classes, pointersReal board only
Raspberry Pi 4 / 5 (Linux, Python)Real board only

The language ​

The simulator interprets a subset of Arduino C++:

  • variables, constants, arrays and { } lists to fill them;
  • functions, if, for, while, switch, break, continue and return;
  • enum, and String with its common methods;
  • simple #define constants. Other lines starting with #, such as #include, are skipped.

struct, class, typedef, namespace and pointers are not supported.

Arduino functions it knows ​

KindFunctions
PinspinMode, digitalWrite, digitalRead, analogWrite, analogRead, ledcAttach, ledcWrite
Timedelay, delayMicroseconds, millis, micros
Sound and sensorstone, noTone, pulseIn
Built-in RGB LEDrgbLedWrite, neopixelWrite (ESP32-S3 only)
Mathsmap, constrain, min, max, abs, sq, sqrt, pow, sin, cos, round, random
Serialbegin, print, println, write, printf, available, peek, read, readString, readStringUntil, parseInt
Stringlength, toInt, toFloat, trim, toLowerCase, toUpperCase, concat, equals, equalsIgnoreCase, startsWith, endsWith, indexOf, charAt, substring
Servoattach, write, read, attached, detach

analogReadResolution, analogSetAttenuation, randomSeed and yield are accepted and do nothing. Calling a function that is neither in this list nor in your sketch stops the run with an error saying it is not available in the simulator.

The constants HIGH, LOW, INPUT, OUTPUT, INPUT_PULLUP, INPUT_PULLDOWN, LED_BUILTIN, PI, DEC, HEX, BIN and OCT are defined, plus each board's pin names, such as A0 or D1, and RGB_BUILTIN on the ESP32-S3.

Export files ​

For a project called Night light:

ExportFile
Programnight-light.ino, or night-light.py for a Raspberry Pi 4 / 5
Circuit diagramnight-light-circuit.svg
Build sheetnight-light-build-sheet.md
Parts to ordernight-light-parts.csv
Project filenight-light.circuitlab.json
Parts tab listscircuit-lab-parts.md and circuit-lab-parts.csv

See Export and import.

Deploy board names ​

The Deploy dialog shows the name arduino-cli uses for each board (its FQBN). Use the same one in the Arduino IDE or arduino-cli.

Boardarduino-cli board
Arduino Uno R3arduino:avr:uno
Arduino Nanoarduino:avr:nano, then arduino:avr:nano:cpu=atmega328old if the upload fails
Arduino Mega 2560arduino:avr:mega
ESP32-S3 DevKitC-1esp32:esp32:esp32s3
ESP32 DevKit V1esp32:esp32:esp32doit-devkit-v1
NodeMCU (ESP8266)esp8266:esp8266:nodemcuv2
Raspberry Pi Picorp2040:rp2040:rpipico

The ESP32, ESP8266 and Pico support packages come from extra package indexes, which the app adds for you: Espressif's for the ESP32 boards, the ESP8266 Arduino project's for the NodeMCU, and the arduino-pico project's for the Pico.

Where things are kept ​

WhatWhere
Ticks, code edits, your projects, owned parts and settingsOn this device only. On the website, in the browser's storage for the site; in the apps, in the app's own data folder.
The deploy add-on on Linux~/.local/share/circuit_lab/addons
The deploy add-on on Windows%LOCALAPPDATA%\circuit_lab\addons

Nothing is sent anywhere. Clearing the website's data, or removing the app, removes your work, so export project files you want to keep.

Limits ​

ItemValue
Serial monitorKeeps the last 500 lines
Part namesUp to 14 characters
Boards8; the Raspberry Pi 4 / 5 is not simulated
Kinds of part21
Library projects88

Next steps ​