Documentation ¶
Overview ¶
Package shtc3 provides a driver for the SHTC3 digital humidity sensor series by Sensirion.
Index ¶
- Constants
- type Device
- func (d *Device) ReadHumidity() (relativeHumidity int16, err error)
- func (d *Device) ReadTemperature() (tempMilliCelsius int32, err error)
- func (d *Device) ReadTemperatureHumidity() (tempMilliCelsius int32, relativeHumidity int16, err error)
- func (d *Device) Sleep() error
- func (d *Device) WakeUp() error
Constants ¶
View Source
const ( SHTC3_ADDRESS = 0x70 SHTC3_CMD_WAKEUP = "\x35\x17" // Wake up SHTC3_CMD_MEASURE_HP = "\x7C\xA2" // Read sensor in high power mode with clock stretching SHTC3_CMD_SLEEP = "\xB0\x98" // Sleep SHTC3_CMD_SOFT_RESET = "\x80\x5D" // Soft Reset )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device wraps an I2C connection to a SHT31 device.
func New ¶
New creates a new SHTC3 connection. The I2C bus must already be configured.
This function only creates the Device object, it does not initialize the device. You must call Configure() first in order to use the device itself.
func (*Device) ReadHumidity ¶
Read returns the relative humidity in hundredths of a percent.
func (*Device) ReadTemperature ¶
Read returns the temperature in celsius milli degrees (°C/1000).
Click to show internal directories.
Click to hide internal directories.