π
LM393 Light
Just light or dark
Page 49 reads the DO pin of an LM393 photoresistor module on GPIO18 and turns it into a light/dark verdict, showing the raw level and a flip counter. The threshold comes from the module trimmer.
This is not the BH1750 on page 39: it gives a switch, not a lux value.
Screen
On-screen interface
A recreation of this page on the 2.41-inch AMOLED display (600 Γ 450). Actual interaction and layout follow the latest firmware.
StatusDarkDO = low
Flips6 today
Thresholdtrimmer
PinGPIO 18
Health88
Digital only β BH1750 (p.39) for lux
Screen Β· Page 49
May differ from the actual interface; the screen of the real device is the final reference.
Highlights
Key capabilities
π
Light/dark
High/low level mapped to a plain verdict.
π
Trimmer
Sets how dark counts as dark.
π’
Flip count
How many times it toggled today.
π©Ί
Health score
Stuck-high or stuck-low is flagged.
Specifications
Technical specs
PinGPIO 18
OutputDigital DO (3-pin version has no AO)
Supply3.3β5 V
Firmware pagePage 49
Use Cases
Typical scenarios
Dusk detection
Trigger a reminder or lamp when it gets dark.
Beam break
An interrupted light path flips the level.
Commands
Related commands
page 49 Open the LM393 page lm Read level and verdict
β Boundaries & notes
- Digital only β no lux value; use the BH1750 on page 39 for that.
- Photoresistors are slow (tens of ms), not for fast light signals.
Other feature pages
π Overview Home12-tile quick launch plus everyday toggles β the power-on default, and where everything starts.β‘Dashboard Β· Power & ConsumptionBLE-connected current meter with live voltage/current/power curves at fixed-point 10βΆ precision.πWaveform PanelLive curves for frame rate, heap and task load β spot the bottleneck at a glance.π΅BLE DebuggerBLE scan/connect/service discovery with full GATT tree browsing and read/write.