Build an LDR change-evidence record
Collect a bounded before-change-after-retest LDR record that preserves sensor identity, sample order, units, validity, setup changes, and claim limits.

Physics Phoebe: I want you to preserve the question, state change, units, validity, and retest trigger—not just the number.
Predict the reading, then compare it with the measurement.
Wokwi ESP32
Third party ToolCollect a bounded before-change-after-retest LDR record that preserves sensor identity, sample order, units, validity, setup changes, and claim limits.
Open the ESP32 editor, paste diagram.json, then paste sketch.ino.
Open Wokwi to paste in the files (new tab)Get the files
Use both prepared files. This is a paste-in setup; saving a project requires a Wokwi account.
sketch.ino
- Use the launch button above to open the ESP32 editor in Wokwi.
- Select the editor’s diagram.json tab and replace all its text with the supplied diagram.json.
- Select the sketch.ino tab, replace all its text with the supplied sketch.ino, then click Start Simulation.
Steps
Step 1
- Do
- Paste diagram.json and sketch.ino into a new Wokwi ESP32 project, then trace the LDR module's analog path.
- You will see
- The module uses 3.3 V and common ground, with analog output connected to GPIO34.
- Why it matters
- The controller, sensor identity, supply, and signal path are setup evidence for every later reading.

Step 1 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 2
- Do
- Inspect the serial change-note handler and evidence-record output.
- You will see
- Each record preserves sample order, LDR identity, named setup state, ADC counts, voltage, and validity.
- Why it matters
- A value without identity, units, context, and validity cannot support a reviewable interpretation.

Step 2 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 3
- Do
- Start the simulation and read the declared scope and measurement question.
- You will see
- The lab declares direction-only scope, no reference, and asks whether a light change moves the recorded signal.
- Why it matters
- The declaration prevents simulated ADC values from being mistaken for calibrated lux or building-performance evidence.

Step 3 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 4
- Do
- Send BASE in Serial Monitor while the supplied LDR control remains at 500 lux.
- You will see
- The next valid record pairs a BASE state with an ADC count and derived voltage.
- Why it matters
- A named starting condition gives the later direction-of-change result a comparison point.

Step 4 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 5
- Do
- Set the LDR control to 50 lux, send SHADE, and preserve the next reading.
- You will see
- The SHADE evidence record changes from the baseline while retaining identity, count units, voltage, and valid state.
- Why it matters
- The before-and-after pair supports only the direction-of-change claim in this simulated setup.

Step 5 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 6
- Do
- Set the LDR control to 10,000 lux, send BRIGHT, and preserve the next reading.
- You will see
- The BRIGHT record moves in the opposite direction from SHADE and remains within the 12-bit ADC range.
- Why it matters
- Exercising both sides of the baseline is stronger evidence than one attractive reading.

Step 6 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 7
- Do
- Restore the LDR control to 500 lux, send RETEST, and compare with the baseline.
- You will see
- The RETEST record returns near the original simulated baseline value.
- Why it matters
- A return test checks repeatability and states the trigger: any placement, optical cover, wiring, sampling, or reference change requires a new record.

Step 7 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab)
Chapter checks
These questions refer to the chapter’s examples. Use the return links to review their answers.
A team chooses a sensor module because it is easy to wire, but the review does not state placement, calibration, environment, or the decision it supports. What is the strongest finding?
Return to the chapter’s knowledge checkA soil-moisture sensor works during a classroom demo but degrades after outdoor installation. What should the practitioner add to the hardware decision record?
Return to the chapter’s knowledge checkA room comfort sensor is mounted inside a sealed electronics box, and its readings track board heat more than room air. What is the best under-the-hood response?
Return to the chapter’s knowledge check