Optical, Color & ToF
ROHM Semiconductor BH1750 digital twin
16-bit direct-lux digital ambient light sensor (1–65535 lx).
VendorROHM SemiconductorOptical, Color & ToF
InterfaceI2C0x23 (ADDR=LOW) or 0x5C (ADDR=HIGH)
Record Status2026-11-19rev c3f5f9950 (clean tree)
Driver oracle & capability record
Part of the 27-part, 44-case twin-factory oracle suite (44/44 passed, generator 0.1.0+policy.12).
| Driver reference | Twin-factory vendor-driver oracle (0.1.0+policy.12) |
|---|---|
| Evidence standing | provisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples). |
| Published record | accuracy/twin-factory-oracles-2026-11-19b.json (SHA-256 caa6e32e53c5) |
Key registers & reset values
| Address / Field | Register | Reset / Expected | Purpose |
|---|---|---|---|
0x01 | POWER_ON | Command | Wake sensor waiting for measurement opcode |
0x10 | CONT_H_RES | 2-byte BE | Continuous 1 lx resolution mode (lux = raw / 1.2) |
Attach with ct CLI
Shell - run firmware with BH1750
# Run compiled firmware with BH1750 attached on nucleo-f401re
ct run --json --board nucleo-f401re --device bh1750 build/app.elf
# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/bh1750.xml tests/bh1750-fault.suite.yamlFault-injection test snippet (suite.yaml)
tests/bh1750-fault.suite.yaml
version: 1
board: nucleo-f401re
firmware: build/app.elf
tests:
- name: bh1750-i2c-nack-and-bad-id
faults:
- at_ms: 30
bus: I2C1
kind: nack
address: 0x23
count: 2
- at_ms: 150
part: bh1750
kind: frozen_reading
expect:
console_contains: "DRIVER_FAULT_DETECTED"
exit_code: 0