Back to start

ADXL345: Tilt → Alarm → Recover

Compiled Uno orientation checks, a reversible I²C fault and a saved capture. Virtual sensor only.

This is a read-only preview of the built-in guide. Steps below describe what you will do after starting your own project; no project has been created. Expected observations are software checks, not physical test evidence.

FluxBench is in private beta, by invitation only. An invited account is required to run, compile and save. Signing in does not grant an invitation.

Invited? Sign in to continue with this guide
  1. 1. A separate Uno project

    This guide created a separate project with the qualified Uno, one ADXL345, two external 3.3 V pullups, sketch and three saved scenarios. Previous work was saved first. Confirm Uno in the board picker, then choose the Compiled Uno button in the Lab toolbar explicitly; Teaching is the default and has no ADXL345 register model.

    The time shown is an estimate, not measured beginner performance. This is a virtual held-gravity model, without a physical sensor or controller.

  2. 2. Trace the supported I²C circuit

    Find ADXL345 accel at address 0x53. Its power and ground share the Uno supply return; SDA reaches A4 and SCL reaches A5. Each bus line has its own external 3.3 V pullup. The sketch disables Uno internal 5 V pullups. Inspect the circuit in 2D or 3D before capturing.

    The four-pin module and byte transactions abstract the real electrical waveform. No alternate address, FIFO, interrupt or generic sensor library is modeled.

  3. 3. Read the alarm sketch

    The saved sketch enables measurement and reads six signed XYZ bytes three times. It sets D13 HIGH when X is greater than 100 nominal counts and LOW otherwise. A missing I²C response prints MISSING and keeps D13 LOW. Compilation and captured execution are separate evidence.

    One g is about 256 counts in this ideal ±2 g mode. Held tilt changes at 20 and 40 simulated ms; they are not physical acceleration or sample-rate behavior.

  4. 4. Capture flat, +X and −X

    In Compiled Uno, open Inputs and choose “Tilt alarm: flat → +X → −X”, then Compile & capture. Inspect six checks: flat 0,0,256 and D13 LOW at 15 ms; +X 256,0,0 and HIGH at 35 ms; −X −256,0,0 and LOW at 55 ms. The result must say PASS for each saved expectation.

    Selecting the scenario or pressing Next does not prove success. Read the actual captured checks and timestamped UART lines.

  5. 5. Check combined held orientations

    Select “Held combined orientations” under Inputs and make a fresh compiled capture. The independent ideal expectations are +45°/+45° → 181,128,128 with D13 HIGH; −30°/+60° → −128,192,111 with D13 LOW; then flat → 0,0,256 with D13 LOW. All six checks must pass.

    The model composes X pitch then Y roll and rounds each axis. Motion, noise, calibration and physical accuracy remain outside this check.

  6. 6. Diagnose and restore the bus

    First select “SDA loss and restored read” and capture: flat, MISSING/D13 LOW while SDA is disconnected, then +X/D13 HIGH after restoration. The scenario leaves live wires intact. For a live fault, remove the SDA jumper from Uno A4 to accel, capture the alarm scenario and inspect the failed orientation checks and MISSING line. Undo the wire removal and run the alarm scenario again; require six fresh PASS checks.

    A complete capture containing MISSING does not make the original orientation expectations pass. Inspect the 3D circuit and external pullups if recovery fails. Undo affects the live circuit; saved scenarios remain.

  7. 7. Save the guide checkpoint

    Save this project after restoring the wire. Its sketch, circuit, three scenario definitions and current guide step are stored together. Capture results are temporary and must be rerun after reopening. Record any changes in the description.

    Check that Save confirms success before leaving this project. Do not treat a guide click as a passing capture.

  8. 8. Reopen the same project

    Open saved projects and choose this same ADXL345 project. Confirm the Uno board, sketch, eight original wires, three scenarios and saved guide position returned. Selecting the saved project replaces unsaved workspace edits; the saved copy remains separate from your earlier work.

    The Lab may return to Teaching on reload. Select Compiled Uno again; tilt controls and old capture results reset.

  9. 9. Capture the reopened source

    After reopening, explicitly select Compiled Uno, choose “Tilt alarm: flat → +X → −X” under Inputs, and Compile & capture again. Require all six current checks to PASS and inspect the UART and D13 trace. This fresh compiled capture belongs to the reopened sketch and circuit; finish only after observing it.

    The model does not verify a physical board, power-up behavior, bus voltage waveform or real moving sensor. Human usability timing is still unmeasured.

Support profiles and limits
FluxBench.AI