Environment & Temperature
Aosong AHT20 digital twin
Factory-calibrated I2C temperature and relative humidity sensor.
VendorAosongEnvironment & Temperature
InterfaceI2C0x38 (fixed)
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 |
|---|---|---|---|
0x71 | STATUS | Bit 3 CAL=1 | Busy flag (bit 7) and calibration status (bit 3) |
0xAC 0x33 0x00 | TRIGGER_MEAS | 6-byte + CRC | Starts 20-bit RH and 20-bit temperature conversion |
Attach with ct CLI
Shell - run firmware with AHT20
# Run compiled firmware with AHT20 attached on esp32c3-devkitm
ct run --json --board esp32c3-devkitm --device aht20 build/app.elf
# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/aht20.xml tests/aht20-fault.suite.yamlFault-injection test snippet (suite.yaml)
tests/aht20-fault.suite.yaml
version: 1
board: esp32c3-devkitm
firmware: build/app.elf
tests:
- name: aht20-i2c-nack-and-bad-id
faults:
- at_ms: 30
bus: I2C1
kind: nack
address: 0x38
count: 2
- at_ms: 150
part: aht20
kind: frozen_reading
expect:
console_contains: "DRIVER_FAULT_DETECTED"
exit_code: 0