Simulator

Interactive ESP32 Simulator Workspace

Use the simulator to step through beginner examples, inspect variables, and observe LED behavior. Start with the lesson pages, then launch the full workspace.

What you can practice

Digital output

Step through LED ON/OFF examples using digitalWrite() and delay().

PWM and inputs

Explore brightness control, buttons, and simulated sensor values.

Simulator-Ready Lessons

Open a lesson first or jump directly into the matching simulator workspace.

Lesson 1 - Understanding bool and boolean in Arduino

Beginner lesson on true/false values with a real-time bool simulator example.

Lesson 2 - Understanding int Data Type

Learn how int stores whole numbers and practice changing delay and counter values.

Lesson 3 - Understanding long Data Type

Explore long timing values and a millis()-style interval example in the simulator workspace.

Lesson 4 - Understanding unsigned int Data Type

Practice unsigned int counters and non-negative timing values with LED blink simulation.

Lesson 5 - Understanding unsigned long Data Type

Practice unsigned long millis()-style timing and long-running counters in the simulator workspace.

Lesson 6 - Understanding char Data Type

Learn char variables as single-character labels and status markers in a guided LED example.

Lesson 7 - Working with String and String()

Practice String variables, String() conversion, and Serial text messages in a guided workspace example.

Lesson 8 - Understanding float Data Type

Practice float variables for decimal values, sensor-style calculations, and measurement logic.

Lesson 9 - Understanding double Data Type

Practice double variables for precision-focused decimal calculations and calibration-style examples.

Lesson 10 - Understanding short Data Type

Practice short and unsigned short variables for small-range values, offsets, and counters.

Lesson 11 - Understanding word Data Type

Practice word variables for positive readings, scaled values, and compact counters.

Lesson 12 - Understanding Arrays in Arduino

Practice arrays, indexing, and matching pin/delay values in a guided multi-LED example.

Lesson 13 - Understanding Digital Input in Arduino

Practice digitalRead(), INPUT_PULLUP, and active-low button logic in a guided button input example.

Lesson 14 - Understanding Digital Output in Arduino

Practice pinMode(), digitalWrite(), and delay() timing in a guided LED output example.

Lesson 15 - Using delay() for Basic Timing

Practice delay() timing, blink phase durations, and blocking wait behavior in a guided example.

Lesson 16 - Using delayMicroseconds() for Precise Delays

Practice microsecond pulse timing, short delays, and precision-focused timing concepts in a guided example.

Lesson 17 - Using millis() for Non-Blocking Timing

Practice non-blocking millis() timing, interval checks, and responsive loop behavior in a guided example.

Lesson 18 - Using micros() for Microsecond Timing

Practice non-blocking micros() timing, microsecond interval checks, and short pulse timing patterns.

Lesson 19 - Using if Statement

Practice if-else decisions with INPUT_PULLUP button input and LED output behavior.

Lesson 20 - Using else Statement

Practice false-path logic with else and verify branch behavior using button input.

Lesson 21 - Using for Loop

Practice fixed-count repetition with for loop flow, LED blinking, and loop index updates.

Lesson 22 - Using while Loop

Practice condition-based repetition with while loop checks, counter updates, and safe loop exits.

Lesson 23 - Using do...while Loop

Practice post-condition loop flow where the body runs first, then the condition is checked.

Lesson 25 - Using continue Statement

Practice skipping selected loop iterations with continue while the loop still progresses.

Lesson 26 - Using switch...case Statement

Practice multi-option mode handling with switch...case, default fallback, and break behavior.

Lesson 27 - Using return Statement

Practice function-level exits, early return checks, and return value flow from helper functions.

Lesson 28 - Understanding goto (and Why to Avoid It)

Practice goto label jumps, observe non-linear control flow, and compare it with safer structured patterns.

Lesson 29: Using = Assignment Arithmetic Operator

Practice assignment updates, expression-based value storage, and variable tracking in the simulator.

Lesson 30: Using + Addition Arithmetic Operator

Practice + addition with integer and float values, then track totals with += in the simulator.

Lesson 31: Using - Subtraction Arithmetic Operator

Practice - subtraction and -= updates with timing budgets and float differences.

Lesson 32: Using * Multiplication Arithmetic Operator

Practice * multiplication and *= scaling with timing and gain examples.

Lesson 33: Using / Division Arithmetic Operator

Practice / division, integer-vs-float behavior, and /= updates in guided examples.

Lesson 34: Using % Remainder Arithmetic Operator

Practice % remainder logic for even/odd checks, cycle patterns, and wrapped indexing.

Lesson 35: Using && Logical AND Boolean Operator

Practice && logical conditions with button state and threshold checks that drive LED ON/OFF.

Lesson 36: Using ! Logical NOT Boolean Operator

Practice ! negation, active-low input logic, and readable branch control using boolean inversion.

Lesson 38: Using == Equal To Comparison Operator

Practice == value comparisons for button checks and state-change detection in live simulation.

Lesson 39: Using > Greater Than Comparison Operator

Practice > threshold comparisons and observe output changes as values move above limits.

Lesson 40: Using >= Greater Than or Equal To Comparison Operator

Practice >= inclusive threshold checks and verify equal-value behavior with LED output.

Lesson 41: Using < Less Than Comparison Operator

Practice < strict lower-than checks and verify behavior below and at the exact limit.

Lesson 42: Using <= Less Than or Equal To Comparison Operator

Practice <= inclusive upper-limit checks and confirm equal-value behavior in simulation.

Lesson 43: Using != Not Equal To Comparison Operator

Practice != mismatch checks and detect state changes without repeating actions.

Lesson 44: Using += Compound Addition Operator

Practice += loop updates for counters and timing values in a guided simulator example.

Lesson 45: Using -= Compound Subtraction Operator

Practice -= loop countdown updates and decreasing timing values in guided simulation.

Lesson 46: Using *= Compound Multiplication Operator

Practice *= loop scaling updates and exponential growth patterns with safe reset behavior.

Lesson 47: Using /= Compound Division Operator

Practice /= loop scaling-down updates and observe integer division behavior in timing values.

Lesson 48: Using %= Compound Remainder Operator

Practice %= wrap-around updates for repeating cycles and periodic LED events.

Lesson 49: Using &= Compound Bitwise AND Operator

Practice &= mask updates that preserve selected bits and clear unwanted flag bits.

Lesson 50: Using |= Compound Bitwise OR Operator

Practice |= mask updates that set selected bits while preserving existing flags.

Lesson 51: Using ^= Compound Bitwise XOR Operator

Practice ^= mask updates that toggle selected bits for alternating LED/flag behavior.

Lesson 52: Using ++ Increment Operator

Practice ++ counters with pre/post increment behavior and serial-traced value changes.

Lesson 53: Using -- Decrement Operator

Practice -- counters with pre/post decrement behavior and serial-traced value changes.

Lesson 54: Using << Bitshift Left Operator

Practice << bit movement, power-of-two scaling, and flag-mask patterns in guided simulation.

Lesson 55: Using >> Bitshift Right Operator

Practice >> bit movement, divide-by-two scaling, and bit extraction with mask checks.

Lesson 56: Using & Bitwise AND Operator

Practice & masking to extract LED/sensor/error flags from a packed status byte.

Lesson 57: Using | Bitwise OR Operator

Practice | bitwise OR with masks to set flags and control LED/Serial behavior.

Lesson 58: Using ^ Bitwise XOR Operator

Practice ^ bitwise XOR to toggle selected bits and observe state flips across loop cycles.

Lesson 59: Using ~ Bitwise NOT Operator

Practice ~ bitwise inversion and use masks to keep only the bits needed for output logic.

Lesson 60: Using byte() Conversion

Practice byte() conversion behavior, including wrap-around results for large and negative values.

Lesson 61: Using char() Conversion

Practice char() conversion from numeric codes to letters/symbols and verify character output behavior.

Lesson 62: Using float() Conversion

Practice float() casting to preserve decimal math for normalization, voltage scaling, and threshold logic.

Lesson 64: Using long() Conversion

Practice long() casting to protect large multiplication/timing values from overflow in conversion math.

Lesson 65: Using (unsigned int) Conversion

Practice (unsigned int) casting behavior for non-negative values, wrap-around cases, and threshold logic.

Lesson 66: Using (unsigned long) Conversion

Practice (unsigned long) casting for large non-negative timing values and wrap-around conversion behavior.

Lesson 67: Using word() Conversion

Practice word() 16-bit narrowing, wrap-around behavior, and unsigned comparisons in a compact example.

Lesson 70: Using analogReference()

Practice analogReference(DEFAULT), observe ADC scaling, and inspect raw-to-voltage conversion flow.

Lesson 68: Using analogRead() for Analog Input

Practice analogRead(), map readings to PWM, and watch LED brightness follow sensor changes.

Lesson 69: Using analogReadResolution()

Practice analogReadResolution(), see how ADC range changes, and remap readings into PWM output.

Lesson 71: Using analogWrite() for PWM Output

Practice analogWrite() PWM brightness control with smooth fade up/down transitions.

Lesson 72: Using analogWriteResolution()

Practice analogWriteResolution() with 12-bit range and inspect duty-percent precision changes.

Lesson 73: SPI Communication

Practice SPI transaction sequence with CS control, transfer flow, and TX/RX debug output.

Lesson 77: Using Wire (I2C) Communication

Practice Wire.begin(), transmit/request flow, status checking, and multi-byte I2C value parsing.

Lesson 102: Wi‑Fi Connect (Simulated)

Simulated Wi‑Fi scan/connect flow with mock IP output to the Serial Monitor.

Lesson 78: Using abs() Math Function

Practice abs() magnitude comparison for sensor error tolerance and LED warning decisions.

Lesson 79: Using constrain() Function

Practice value clamping with constrain() before map()/PWM output for stable control logic.

Lesson 80: Using map() Function

Practice map() range scaling from sensor input to PWM output with proportional behavior.

Lesson 82: Using min() Function

Practice min() comparison to pick lower values for conservative mapping and output behavior.

Lesson 83: Using pow() Function

Practice pow() exponent curves for non-linear sensor shaping and PWM control behavior.

Lesson 84: Using sq() Function

Practice sq() to amplify error magnitude and drive non-linear LED intensity behavior.

Lesson 85: Using sqrt() Function

Practice sqrt() to compute vector magnitude and convert multi-axis input into output intensity.

Lesson 86: Using cos() Function

Practice cos() wave output, normalize -1..1 to PWM range, and observe smooth LED breathing.

Lesson 87: Using sin() Function

Practice sin() wave output, normalize -1..1 to PWM range, and observe smooth LED breathing.

Lesson 88: Using tan() Function

Practice tan() with safe angle windows, clamp high ratios, and map results to stable PWM output.

Lesson 89: Using random() Function

Practice random() ranges, pseudo-random sequence behavior, and variable blink timing in simulation.

Lesson 90: Using randomSeed() Function

Practice randomSeed() startup seeding and observe how seed choice affects random() output sequences.

Lesson 91: Using interrupts() Function

Practice noInterrupts()/interrupts() flow and safe snapshot reads from ISR-updated counters.

Lesson 92: Using noInterrupts() Function

Practice noInterrupts() critical sections, safe shared-variable copies, and fast interrupt restore.

Lesson 93: Using attachInterrupt() External Interrupts

Practice attachInterrupt() trigger flow, ISR flag/counter updates, and safe loop-side snapshots.

Lesson 94: Using detachInterrupt() External Interrupts

Practice detachInterrupt() threshold-based shutdown of ISR callbacks and stable post-detach state handling.

Lesson 95: Using digitalPinToInterrupt() External Interrupts

Practice digitalPinToInterrupt() mapping checks, supported-pin validation, and safe attachInterrupt() setup.

Lesson 96: Using noTone() Advanced I/O

Practice noTone() sound-stop behavior with tone() pairing and button-driven alarm state control.

Lesson 97: Using tone() Advanced I/O

Practice tone() frequency and duration behavior with button-triggered buzzer activation flow.

Lesson 98: Using pulseIn()

Practice pulseIn() pulse-width measurement with timeout handling and distance-style timing conversion.

Lesson 99: Using pulseInLong()

Practice pulseInLong() long-duration pulse timing with timeout checks and unit conversion workflow.

Lesson 100: Using shiftIn()

Practice shiftIn() byte capture, bit-order interpretation, and serial debugging for shift-register style inputs.

Lesson 101: Using shiftOut()

Practice shiftOut() byte transmission, latch sequencing, and output-pattern updates for shift-register control.

Lesson 74: Using Print Class in Arduino

Practice print()/println() formatting with labels, values, and clean Serial Monitor line output.

Lesson 75: Using Serial Communication

Practice Serial.begin(), available/read input flow, and command-based LED control with serial feedback.

Lesson 76: Understanding Stream Class

Practice Stream input parsing with readStringUntil(), parseInt(), parseFloat(), and command validation.