Documentation ¶
Index ¶
- type BME280
- func (bme280 *BME280) BME280Init(channel string, addr int) int
- func (bme280 *BME280) BME280ReadAltitude(seaLevel float32) float32
- func (bme280 *BME280) BME280ReadHumidity() float32
- func (bme280 *BME280) BME280ReadPressure() float32
- func (bme280 *BME280) BME280ReadTemperature() float32
- func (bme280 *BME280) BME280ReadValues() BMEData
- func (bme280 *BME280) BME280SeaLevelForAltitude(altitude float32, atmospheric float32) float32
- func (bme280 *BME280) BMESetAddress(addr int)
- type BMEData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BME280 ¶
type BME280 struct { Dev *i2c.Device Config bme280Config // contains filtered or unexported fields }
BME280 holds the device and all configuration data for the sensor
func (*BME280) BME280Init ¶
BME280Init Opens a file system handle to the I2C device reads the calibration data and sets the device into auto sensing mode
func (*BME280) BME280ReadAltitude ¶
func (*BME280) BME280ReadHumidity ¶
func (*BME280) BME280ReadPressure ¶
func (*BME280) BME280ReadTemperature ¶
func (*BME280) BME280ReadValues ¶
bme280ReadValues Reads the sensor register values and translate them into calibrated readings using the previously loaded calibration data Temperature is expressed in Celsius degrees as T * 100 (for 2 decimal places) Pressure is <future> Humidity is express as H * 1024 (10 bit fraction)
func (*BME280) BME280SeaLevelForAltitude ¶
!
- Calculates the pressure at sea level (in hPa) from the specified
- altitude (in meters), and atmospheric pressure (in hPa).
- @param altitude Altitude in meters
- @param atmospheric Atmospheric pressure in hPa
- @returns the pressure at sea level (in hPa) from the specified altitude
func (*BME280) BMESetAddress ¶
Click to show internal directories.
Click to hide internal directories.