Drive AHT10, AHT20, and AHT30 temperature & humidity sensors over I2C with PHP
0.6.0
2026-07-29 02:31 UTC
Requires
- php: ^8.3
- fabricate/circuits: ^0.6.0
- fabricate/nuts-and-bolts: ^0.6.0
- gpio/contracts: ^0.6.0
- gpio/i2c: ^0.6.0
Suggests
- microscrap/i2c: ^0.5.0 - For direct linux-based I2C
- microscrap/mpsse: ^0.5.0 - For I2C over an FTDI Serial-to-USB Device
This package is auto-updated.
Last update: 2026-08-11 22:04:14 UTC
README
I2C drivers for AHT10 / AHT20 / AHT30 temperature & humidity sensors. Extends GeneralPurposeIO\Circuits\SensorIC.
Register
Provider registers catalog slugs aht10, aht20, aht30 and wires ahtx0:make-profile into circuit:make-profile.
Profiles
workshop vendor:publish --tag=gpio-circuits-config workshop circuit:make-profile # picks any installed IC; AHTx0 delegates here workshop ahtx0:make-profile # AHT10 / AHT20 / AHT30 only
The command asks I2C driver / device / slave from #[Pinout], and always sets boot_now => true.
Circuit::profile('climate_lab');
Smoke sketch
Requires at least one AHTx0 profile in config/circuits.php:
php workshop runner ahtx0-smoke php workshop runner ahtx0-smoke --profile=climate_lab
Provisions only via Circuit::profile() — samples °C / %RH until you Ctrl-C.