Language & Hardware Reference
Concise reference guides for Arduino C/C++ core APIs, hardware timing, sensor interfaces, and circuit components.
Arduino API
Pin modes: INPUT, OUTPUT, INPUT_PULLUP
What pinMode() does electrically, and which mode to use.
digitalWrite() and digitalRead()
Switch outputs and read inputs as HIGH or LOW.
analogRead() and analogWrite()
ADC readings and PWM outputs on each board.
Timing: delay(), millis(), micros()
Blocking and non-blocking ways to measure and wait.
Serial communication
begin, print, println, available, read and printf.
Concepts
Data types and overflow
Why int behaves differently on the Uno and the ESP32.
Voltage dividers
Vout = Vin × R2 / (R1 + R2): sensors, level shifting and potentiometers.
I²C bus basics
Two wires, many devices, each with an address.
What the simulator does and doesn't do
An honest list of what Robotry Labs models.
ESP32
Circuit Components Reference
Electrical properties, safe operating limits, and wiring guidance for all components supported by Circuit Lab.
LED
outputLight-emitting diode. Current flows from the long leg (anode, +) to the short leg (cathode, −).
RGB LED (common cathode)
outputThree LEDs (red, green, blue) in one package sharing a cathode. Mix colours with PWM.
Resistor
passiveLimits current. Colour bands show the value.
Potentiometer
inputA knob that divides voltage. Outer pins to 5V/3.3V and GND, the middle (wiper) to an analog pin.
Light sensor (LDR)
sensorPhotoresistor: resistance falls as light increases. Use it with a 10 kΩ resistor as a voltage divider.
Piezo buzzer (passive)
outputPlays the frequency you send with tone(). A plain HIGH only clicks.
Ultrasonic sensor HC-SR04
sensorMeasures distance with sound: a 10 µs pulse on TRIG, then ECHO stays HIGH for 58 µs per centimetre.
Temperature & humidity (DHT11/DHT22)
sensorDigital sensor read with the DHT library.
Servo motor (SG90)
actuatorTurns to an angle from 0° to 180° set by the Servo library.
DC motor + driver (L298N-style)
actuatorIN1/IN2 set the direction, EN (PWM) sets the speed. The driver supplies the motor current.
Relay module (5 V)
actuatorAn electrically controlled switch. When triggered it connects COM to NO (otherwise COM to NC).
LCD 16×2 (I²C)
displayCharacter display with an I²C backpack (usually address 0x27).
OLED 128×64 (SSD1306)
displaySmall graphic display. You can place and wire it; drawing graphics isn't simulated yet.