মূল বিষয়বস্তুতে যান
Documentation

Language & Hardware Reference

Concise reference guides for Arduino C/C++ core APIs, hardware timing, sensor interfaces, and circuit components.

Circuit Components Reference

Electrical properties, safe operating limits, and wiring guidance for all components supported by Circuit Lab.

LED

output

Light-emitting diode. Current flows from the long leg (anode, +) to the short leg (cathode, −).

Tip: Always put a resistor (220 Ω–1 kΩ) in series, or the LED and the pin can be damaged.
Terminals: Anode (+), Cathode (−)

RGB LED (common cathode)

output

Three LEDs (red, green, blue) in one package sharing a cathode. Mix colours with PWM.

Tip: Each colour needs its own resistor.
Terminals: Red, Common cathode (−), Green, Blue

Resistor

passive

Limits current. Colour bands show the value.

Tip: Resistors have no direction — either way round works.
Terminals: End 1, End 2

Push button

input

Connects its two sides while pressed. The pins on the same side are always connected.

Tip: Use INPUT_PULLUP and wire the button to GND: pressed reads LOW.
Terminals: Side A, Side B

Potentiometer

input

A knob that divides voltage. Outer pins to 5V/3.3V and GND, the middle (wiper) to an analog pin.

Tip: On an ESP32 connect the outer pin to 3.3V, never 5V.
Terminals: Left (to GND), Wiper (signal), Right (to VCC)

Light sensor (LDR)

sensor

Photoresistor: resistance falls as light increases. Use it with a 10 kΩ resistor as a voltage divider.

Tip: LDR from VCC to the analog pin, 10 kΩ from the analog pin to GND.
Terminals: Leg 1, Leg 2

Piezo buzzer (passive)

output

Plays the frequency you send with tone(). A plain HIGH only clicks.

Tip: Connect + to a GPIO and − to GND.
Terminals: +, −

Ultrasonic sensor HC-SR04

sensor

Measures distance with sound: a 10 µs pulse on TRIG, then ECHO stays HIGH for 58 µs per centimetre.

Tip: ECHO outputs 5 V. On an ESP32 use a voltage divider (e.g. 1 kΩ + 2 kΩ) on ECHO.
Terminals: VCC (5 V), TRIG, ECHO, GND

Temperature & humidity (DHT11/DHT22)

sensor

Digital sensor read with the DHT library.

Tip: Bare sensors need a 10 kΩ pull-up on DATA; most breakout boards already have it.
Terminals: VCC, DATA, NC, GND

Servo motor (SG90)

actuator

Turns to an angle from 0° to 180° set by the Servo library.

Tip: Servos draw bursts of current: power bigger ones from a separate 5 V supply with a shared GND.
Terminals: GND (brown), VCC (red), Signal (orange)

DC motor + driver (L298N-style)

actuator

IN1/IN2 set the direction, EN (PWM) sets the speed. The driver supplies the motor current.

Tip: Never connect a motor straight to a GPIO pin — always use a driver.
Terminals: IN1, IN2, EN (PWM), VCC, GND

Relay module (5 V)

actuator

An electrically controlled switch. When triggered it connects COM to NO (otherwise COM to NC).

Tip: Mains voltage is dangerous. In real projects let an adult or professional wire the high-voltage side.
Terminals: VCC, GND, IN, COM, NO, NC

LCD 16×2 (I²C)

display

Character display with an I²C backpack (usually address 0x27).

Tip: Uno: SDA = A4, SCL = A5. ESP32: SDA = GPIO21, SCL = GPIO22.
Terminals: GND, VCC, SDA, SCL

OLED 128×64 (SSD1306)

display

Small graphic display. You can place and wire it; drawing graphics isn't simulated yet.

Tip: Not simulated yet: test OLED sketches on a real board.
Terminals: GND, VCC, SCL, SDA