Add support for HTS221 capacitive digital sensor for relative humidity and temperature (#295)

hts221: Add support for hts221.go
This commit is contained in:
Alan Wang
2021-11-06 18:02:30 +08:00
committed by GitHub
parent 734adb6df8
commit cd2694e85f
6 changed files with 285 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
// +build !nano_33_ble
package hts221
import "tinygo.org/x/drivers"
// New creates a new HTS221 connection. The I2C bus must already be
// configured.
//
// This function only creates the Device object, it does not touch the device.
func New(bus drivers.I2C) Device {
return Device{bus: bus, Address: HTS221_ADDRESS}
}