aht20: add device

This commit is contained in:
Kenneth Bell
2021-05-11 22:19:27 -07:00
committed by Ron Evans
parent 6b58fdc95a
commit d1ace44754
6 changed files with 260 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
package aht20
import "errors"
const (
Address = 0x38
CMD_INITIALIZE = 0xBE
CMD_STATUS = 0x71
CMD_TRIGGER = 0xAC
CMD_SOFTRESET = 0xBA
STATUS_BUSY = 0x80
STATUS_CALIBRATED = 0x08
)
var (
ErrBusy = errors.New("device busy")
ErrTimeout = errors.New("timeout")
)