Reference
Tabs, keys, settings, parts, simulator coverage and file locations for Circuit Lab 1.0.0.
Tabs
| Tab | What it is for |
|---|---|
| Labs | The course for your board, your progress, the parts on your bench and the board tour |
| Projects | The 88-project library, your own projects, Import and New project |
| Datasheet | Your board in plain words: figures, pin map, 3D model and rules |
| Playground | Common parts wired to your board, for any sketch |
| Parts | What you own, what you want to build, and the parts to order |
| Settings | Colours, 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
| Keys | In a project |
|---|---|
| Ctrl + Enter | Run or stop the sketch |
| F5 | Run or stop the sketch |
| Enter | Send 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
| Setting | Choices |
|---|---|
| Colours | Match my device (the default), Light: drafting paper or Dark: blueprint |
| Text size | Small, Normal, Large or Extra large, for every screen |
| Your board | One of the eight boards. The course, the library and the playground follow it. |
| Currency | A Symbol, and what 1 US dollar equals in it. Select Apply. |
| Your prices | The parts you have priced yourself; Use estimates again clears them |
| Keyboard | The 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 designer | Real part | Pin |
|---|---|---|
| LED | LED, 5 mm, with a 220 Ω resistor | Output. PWM dims it. |
| Push button | Push button, tactile | Input with INPUT_PULLUP; LOW while pressed |
| Knob (potentiometer) | Potentiometer, 10 kΩ | Analog input |
| Buzzer | Passive buzzer | Output, played with tone() |
| Light sensor | Light sensor (LDR) with a 10 kΩ resistor | Analog input; more light reads higher |
| Slide switch | Slide switch | Input with INPUT_PULLUP; LOW when on |
| Relay module | Relay module, 1 channel | Output |
| Temperature sensor | Temperature sensor TMP36 | Analog input |
| Servo motor | Micro servo SG90 | Output, with Servo.h, or ESP32Servo.h on ESP32 boards |
| Distance sensor | Ultrasonic sensor HC-SR04 | Two pins: TRIG out, ECHO in, read with pulseIn() |
| Motion sensor (PIR) | Motion sensor (PIR) HC-SR501 | Input; HIGH on motion |
| Touch sensor | Touch sensor TTP223 | Input; HIGH while touched |
| Tilt switch | Tilt switch | Input with INPUT_PULLUP; LOW when tilted |
| Door sensor (reed switch) | Reed switch and magnet | Input with INPUT_PULLUP; LOW when the door is shut |
| Obstacle sensor (IR) | Obstacle sensor (IR) | Input; LOW when something is in front |
| Soil moisture sensor | Soil moisture sensor | Analog input; drier reads higher |
| Water level sensor | Water level sensor | Analog input; more water reads higher |
| Gas sensor | Gas and smoke sensor MQ-2 | Analog input; a 5 V module |
| Sound sensor | Sound sensor module | Analog input |
| DC motor | DC motor with driver module | Output through the driver module, never straight from a pin. PWM sets the speed. |
| Laser module | Laser module | Output. 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
| Feature | In the simulator |
|---|---|
| Digital output and input, pull-ups | Simulated |
PWM brightness (analogWrite), on each board's own PWM pins | Simulated |
| Analog input at each board's own resolution | Simulated |
| Serial print and serial input | Simulated |
tone() on a buzzer | Shown, not played |
Servo (attach, write, read) and ultrasonic distance (pulseIn) | Simulated |
| Relay, slide switch, TMP36 temperature sensor | Simulated |
millis, delay and non-blocking timing | Simulated |
| Wi-Fi and Bluetooth | Real board only |
| I2C and SPI devices and displays | Real board only |
| Other libraries, structs, classes, pointers | Real 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,continueandreturn; enum, andStringwith its common methods;- simple
#defineconstants. Other lines starting with#, such as#include, are skipped.
struct, class, typedef, namespace and pointers are not supported.
Arduino functions it knows
| Kind | Functions |
|---|---|
| Pins | pinMode, digitalWrite, digitalRead, analogWrite, analogRead, ledcAttach, ledcWrite |
| Time | delay, delayMicroseconds, millis, micros |
| Sound and sensors | tone, noTone, pulseIn |
| Built-in RGB LED | rgbLedWrite, neopixelWrite (ESP32-S3 only) |
| Maths | map, constrain, min, max, abs, sq, sqrt, pow, sin, cos, round, random |
| Serial | begin, print, println, write, printf, available, peek, read, readString, readStringUntil, parseInt |
| String | length, toInt, toFloat, trim, toLowerCase, toUpperCase, concat, equals, equalsIgnoreCase, startsWith, endsWith, indexOf, charAt, substring |
| Servo | attach, 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:
| Export | File |
|---|---|
| Program | night-light.ino, or night-light.py for a Raspberry Pi 4 / 5 |
| Circuit diagram | night-light-circuit.svg |
| Build sheet | night-light-build-sheet.md |
| Parts to order | night-light-parts.csv |
| Project file | night-light.circuitlab.json |
| Parts tab lists | circuit-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.
| Board | arduino-cli board |
|---|---|
| Arduino Uno R3 | arduino:avr:uno |
| Arduino Nano | arduino:avr:nano, then arduino:avr:nano:cpu=atmega328old if the upload fails |
| Arduino Mega 2560 | arduino:avr:mega |
| ESP32-S3 DevKitC-1 | esp32:esp32:esp32s3 |
| ESP32 DevKit V1 | esp32:esp32:esp32doit-devkit-v1 |
| NodeMCU (ESP8266) | esp8266:esp8266:nodemcuv2 |
| Raspberry Pi Pico | rp2040: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
| What | Where |
|---|---|
| Ticks, code edits, your projects, owned parts and settings | On 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
| Item | Value |
|---|---|
| Serial monitor | Keeps the last 500 lines |
| Part names | Up to 14 characters |
| Boards | 8; the Raspberry Pi 4 / 5 is not simulated |
| Kinds of part | 21 |
| Library projects | 88 |