Click or drag a part onto the canvas.
Click a pin, then another pin, to add a wire.
Del removes the selection.
How CatSim runs your sketch
Your Arduino C++ is translated to JavaScript and runs in the browser on a simulated ESP32 DevKit V1 (30 pins). Most everyday sketch code works: globals, functions, #define, arrays, enum, switch, String, interrupts. Not supported: class/struct, templates, pointers arithmetic, FreeRTOS tasks.
Core
pinMode · digitalWrite · digitalRead · analogRead (12-bit) · analogReadMilliVolts · analogWrite · dacWrite · delay · millis · micros · map · constrain · random · attachInterrupt · tone/noTone
ESP32 PWM (LEDC)
Core 3.x: ledcAttach(pin, freq, bits), ledcWrite(pin, duty), ledcWriteTone. Core 2.x: ledcSetup(ch, freq, bits), ledcAttachPin(pin, ch), ledcWrite(ch, duty).
Serial
begin · print/println (with HEX/BIN or decimals) · printf · available · read · readString · readStringUntil · parseInt · parseFloat
IoT
WiFi.h — WiFi.begin, status, localIP, RSSI, macAddress, softAP. Any SSID connects after ~1.5 s.
PubSubClient.h — setServer, setCallback, connect, publish, subscribe, loop. Talks to the built-in broker in the IoT · MQTT tab.
HTTPClient.h — begin, GET, POST, getString. Makes real requests via fetch (server must allow CORS).
Libraries
DHT.h (DHT22) · ESP32Servo.h / Servo · LiquidCrystal_I2C.h (16×2, SDA 21 / SCL 22, or Wire.begin(sda, scl)) · Wire.h · ESP.getFreeHeap(), ESP.restart()
ESP32 checks
The console warns about real ESP32 pitfalls: GPIO 6–11 (flash), output on input-only pins 34–39, missing pull-ups on 34–39, ADC2 pins used while WiFi is on, floating inputs, missing ground or power on parts.
Limitations
Numbers are JavaScript doubles; integer division is applied when assigning to int/long variables. Char literals behave as one-letter strings.