Documentation ¶
Overview ¶
Package si70xx is a driver for the Si70xx temperature / humidity sensor
Index ¶
- type Si70xx
- func (d *Si70xx) Close() error
- func (d *Si70xx) FirmwareVersion() (string, error)
- func (d *Si70xx) Humidity() (float32, error)
- func (d *Si70xx) IsPresent() bool
- func (d *Si70xx) LastTemperature() (float32, error)
- func (d *Si70xx) ModelName() (string, error)
- func (d *Si70xx) Readings() <-chan *core.TemperatureAndHumidityReading
- func (d *Si70xx) SerialNumber() (string, error)
- func (d *Si70xx) Start(rate core.DataRate) error
- func (d *Si70xx) Temperature() (float32, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Si70xx ¶
type Si70xx struct { // Bus to communicate over. Bus embd.I2CBus // contains filtered or unexported fields }
Si70xx represents The Si70xx sensor (Si7013, Si7020, or Si7021)
func (*Si70xx) Close ¶
Close stops any period reads in progress. Call this to stop the readings that Start() begins
func (*Si70xx) FirmwareVersion ¶
FirmwareVersion returns the sensor's firmware version
func (*Si70xx) LastTemperature ¶
LastTemperature returns a temperature value that was measured during the last Humidity reading, without waiting for the sensor to perform a new reading.
func (*Si70xx) ModelName ¶
ModelName returns the model name of the sensor (Si7013, Si7020, or Si7021)
func (*Si70xx) Readings ¶
func (d *Si70xx) Readings() <-chan *core.TemperatureAndHumidityReading
Readings is a channel that will contain sensor readings after calling Start()
func (*Si70xx) SerialNumber ¶
SerialNumber returns the sensor's hardware serial number
func (*Si70xx) Start ¶
Start produces a stream of humidity and temperature readings in the Readings() channel
func (*Si70xx) Temperature ¶
Temperature performs a Temperature reading