Lesson 1 - Understanding bool and boolean in Arduino
Beginner lesson on true/false values with a real-time bool simulator example.
Simulator
Use the simulator to step through beginner examples, inspect variables, and observe LED behavior. Start with the lesson pages, then launch the full workspace.
Digital output
Step through LED ON/OFF examples using digitalWrite() and delay().
PWM and inputs
Explore brightness control, buttons, and simulated sensor values.
Open a lesson first or jump directly into the matching simulator workspace.
Beginner lesson on true/false values with a real-time bool simulator example.
Learn how int stores whole numbers and practice changing delay and counter values.
Explore long timing values and a millis()-style interval example in the simulator workspace.
Practice unsigned int counters and non-negative timing values with LED blink simulation.
Practice unsigned long millis()-style timing and long-running counters in the simulator workspace.
Learn char variables as single-character labels and status markers in a guided LED example.
Practice String variables, String() conversion, and Serial text messages in a guided workspace example.
Practice float variables for decimal values, sensor-style calculations, and measurement logic.
Practice double variables for precision-focused decimal calculations and calibration-style examples.
Practice short and unsigned short variables for small-range values, offsets, and counters.
Practice word variables for positive readings, scaled values, and compact counters.
Practice arrays, indexing, and matching pin/delay values in a guided multi-LED example.
Practice digitalRead(), INPUT_PULLUP, and active-low button logic in a guided button input example.
Practice pinMode(), digitalWrite(), and delay() timing in a guided LED output example.
Practice delay() timing, blink phase durations, and blocking wait behavior in a guided example.
Practice microsecond pulse timing, short delays, and precision-focused timing concepts in a guided example.
Practice non-blocking millis() timing, interval checks, and responsive loop behavior in a guided example.
Practice non-blocking micros() timing, microsecond interval checks, and short pulse timing patterns.
Practice if-else decisions with INPUT_PULLUP button input and LED output behavior.
Practice false-path logic with else and verify branch behavior using button input.
Practice fixed-count repetition with for loop flow, LED blinking, and loop index updates.
Practice condition-based repetition with while loop checks, counter updates, and safe loop exits.
Practice post-condition loop flow where the body runs first, then the condition is checked.
Practice early loop exit with break when a stop condition is met.
Practice skipping selected loop iterations with continue while the loop still progresses.
Practice multi-option mode handling with switch...case, default fallback, and break behavior.
Practice function-level exits, early return checks, and return value flow from helper functions.
Practice goto label jumps, observe non-linear control flow, and compare it with safer structured patterns.
Practice assignment updates, expression-based value storage, and variable tracking in the simulator.
Practice + addition with integer and float values, then track totals with += in the simulator.
Practice - subtraction and -= updates with timing budgets and float differences.
Practice * multiplication and *= scaling with timing and gain examples.
Practice / division, integer-vs-float behavior, and /= updates in guided examples.
Practice % remainder logic for even/odd checks, cycle patterns, and wrapped indexing.
Practice && logical conditions with button state and threshold checks that drive LED ON/OFF.
Practice ! negation, active-low input logic, and readable branch control using boolean inversion.
Practice == value comparisons for button checks and state-change detection in live simulation.
Practice > threshold comparisons and observe output changes as values move above limits.
Practice >= inclusive threshold checks and verify equal-value behavior with LED output.
Practice < strict lower-than checks and verify behavior below and at the exact limit.
Practice <= inclusive upper-limit checks and confirm equal-value behavior in simulation.
Practice != mismatch checks and detect state changes without repeating actions.
Practice += loop updates for counters and timing values in a guided simulator example.
Practice -= loop countdown updates and decreasing timing values in guided simulation.
Practice *= loop scaling updates and exponential growth patterns with safe reset behavior.
Practice /= loop scaling-down updates and observe integer division behavior in timing values.
Practice %= wrap-around updates for repeating cycles and periodic LED events.
Practice &= mask updates that preserve selected bits and clear unwanted flag bits.
Practice |= mask updates that set selected bits while preserving existing flags.
Practice ^= mask updates that toggle selected bits for alternating LED/flag behavior.
Practice ++ counters with pre/post increment behavior and serial-traced value changes.
Practice -- counters with pre/post decrement behavior and serial-traced value changes.
Practice << bit movement, power-of-two scaling, and flag-mask patterns in guided simulation.
Practice >> bit movement, divide-by-two scaling, and bit extraction with mask checks.
Practice & masking to extract LED/sensor/error flags from a packed status byte.
Practice | bitwise OR with masks to set flags and control LED/Serial behavior.
Practice ^ bitwise XOR to toggle selected bits and observe state flips across loop cycles.
Practice ~ bitwise inversion and use masks to keep only the bits needed for output logic.
Practice byte() conversion behavior, including wrap-around results for large and negative values.
Practice char() conversion from numeric codes to letters/symbols and verify character output behavior.
Practice float() casting to preserve decimal math for normalization, voltage scaling, and threshold logic.
Practice long() casting to protect large multiplication/timing values from overflow in conversion math.
Practice (unsigned int) casting behavior for non-negative values, wrap-around cases, and threshold logic.
Practice (unsigned long) casting for large non-negative timing values and wrap-around conversion behavior.
Practice word() 16-bit narrowing, wrap-around behavior, and unsigned comparisons in a compact example.
Practice analogReference(DEFAULT), observe ADC scaling, and inspect raw-to-voltage conversion flow.
Practice analogRead(), map readings to PWM, and watch LED brightness follow sensor changes.
Practice analogReadResolution(), see how ADC range changes, and remap readings into PWM output.
Practice analogWrite() PWM brightness control with smooth fade up/down transitions.
Practice analogWriteResolution() with 12-bit range and inspect duty-percent precision changes.
Practice SPI transaction sequence with CS control, transfer flow, and TX/RX debug output.
Practice Wire.begin(), transmit/request flow, status checking, and multi-byte I2C value parsing.
Simulated Wi‑Fi scan/connect flow with mock IP output to the Serial Monitor.
Practice abs() magnitude comparison for sensor error tolerance and LED warning decisions.
Practice value clamping with constrain() before map()/PWM output for stable control logic.
Practice map() range scaling from sensor input to PWM output with proportional behavior.
Practice max() comparison to pick higher sensor values before mapping to output.
Practice min() comparison to pick lower values for conservative mapping and output behavior.
Practice pow() exponent curves for non-linear sensor shaping and PWM control behavior.
Practice sq() to amplify error magnitude and drive non-linear LED intensity behavior.
Practice sqrt() to compute vector magnitude and convert multi-axis input into output intensity.
Practice cos() wave output, normalize -1..1 to PWM range, and observe smooth LED breathing.
Practice sin() wave output, normalize -1..1 to PWM range, and observe smooth LED breathing.
Practice tan() with safe angle windows, clamp high ratios, and map results to stable PWM output.
Practice random() ranges, pseudo-random sequence behavior, and variable blink timing in simulation.
Practice randomSeed() startup seeding and observe how seed choice affects random() output sequences.
Practice noInterrupts()/interrupts() flow and safe snapshot reads from ISR-updated counters.
Practice noInterrupts() critical sections, safe shared-variable copies, and fast interrupt restore.
Practice attachInterrupt() trigger flow, ISR flag/counter updates, and safe loop-side snapshots.
Practice detachInterrupt() threshold-based shutdown of ISR callbacks and stable post-detach state handling.
Practice digitalPinToInterrupt() mapping checks, supported-pin validation, and safe attachInterrupt() setup.
Practice noTone() sound-stop behavior with tone() pairing and button-driven alarm state control.
Practice tone() frequency and duration behavior with button-triggered buzzer activation flow.
Practice pulseIn() pulse-width measurement with timeout handling and distance-style timing conversion.
Practice pulseInLong() long-duration pulse timing with timeout checks and unit conversion workflow.
Practice shiftIn() byte capture, bit-order interpretation, and serial debugging for shift-register style inputs.
Practice shiftOut() byte transmission, latch sequencing, and output-pattern updates for shift-register control.
Practice print()/println() formatting with labels, values, and clean Serial Monitor line output.
Practice Serial.begin(), available/read input flow, and command-based LED control with serial feedback.
Practice Stream input parsing with readStringUntil(), parseInt(), parseFloat(), and command validation.