Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_SPI_SPEED = 4 * 1e6 // 4Mhz DEFAULT_I2C_SPEED = 100 * 1e3 // 100 kHz DEFAULT_I2C_SLAVE = 0x77 )
View Source
const ( BME280_SOFTRESET_VALUE = 0xB6 BME280_SKIPTEMP_VALUE = 0x80000 BME280_SKIPPRESSURE_VALUE = 0x80000 BME280_SKIPHUMID_VALUE = 0x8000 )
View Source
const ( BME280_REG_DIG_T1 register = 0x88 BME280_REG_DIG_T2 register = 0x8A BME280_REG_DIG_T3 register = 0x8C BME280_REG_DIG_P1 register = 0x8E BME280_REG_DIG_P2 register = 0x90 BME280_REG_DIG_P3 register = 0x92 BME280_REG_DIG_P4 register = 0x94 BME280_REG_DIG_P5 register = 0x96 BME280_REG_DIG_P6 register = 0x98 BME280_REG_DIG_P7 register = 0x9A BME280_REG_DIG_P8 register = 0x9C BME280_REG_DIG_P9 register = 0x9E BME280_REG_DIG_H1 register = 0xA1 BME280_REG_DIG_H2 register = 0xE1 BME280_REG_DIG_H3 register = 0xE3 BME280_REG_DIG_H4 register = 0xE4 BME280_REG_DIG_H5 register = 0xE5 BME280_REG_DIG_H6 register = 0xE7 BME280_REG_CHIPID register = 0xD0 BME280_REG_VERSION register = 0xD1 BME280_REG_SOFTRESET register = 0xE0 BME280_REG_CAL26 register = 0xE1 // R calibration stored in 0xE1-0xF0 BME280_REG_CONTROLHUMID register = 0xF2 BME280_REG_STATUS register = 0xF3 BME280_REG_CONTROL register = 0xF4 BME280_REG_CONFIG register = 0xF5 BME280_REG_PRESSUREDATA register = 0xF7 BME280_REG_TEMPDATA register = 0xFA BME280_REG_HUMIDDATA register = 0xFD )
View Source
const ( // Write mask BME280_REG_SPI_WRITE register = 0x7F // Timeout for measuring BME280_TIMEOUT = time.Millisecond * 500 )
View Source
const (
BME280_PRESSURE_SEALEVEL float64 = 103090 // in Pascals
)
Sealevel pressure approximation http://resource.npl.co.uk/pressure/pressure.html
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Filter ¶
type Filter uint8
type Mode ¶
type Mode uint8
type Oversample ¶
type Oversample uint8
const ( BME280_OVERSAMPLE_SKIP Oversample = 0x00 BME280_OVERSAMPLE_1 Oversample = 0x01 BME280_OVERSAMPLE_2 Oversample = 0x02 BME280_OVERSAMPLE_4 Oversample = 0x03 BME280_OVERSAMPLE_8 Oversample = 0x04 BME280_OVERSAMPLE_16 Oversample = 0x05 BME280_OVERSAMPLE_MAX Oversample = 0x07 )
BME280 Oversampling value
func (Oversample) String ¶
func (o Oversample) String() string
type StandbyTime ¶
type StandbyTime uint8
const ( BME280_STANDBY_0P5MS StandbyTime = 0x00 BME280_STANDBY_62P5MS StandbyTime = 0x01 BME280_STANDBY_125MS StandbyTime = 0x02 BME280_STANDBY_250MS StandbyTime = 0x03 BME280_STANDBY_500MS StandbyTime = 0x04 BME280_STANDBY_1000MS StandbyTime = 0x05 BME280_STANDBY_10MS StandbyTime = 0x06 BME280_STANDBY_20MS StandbyTime = 0x07 BME280_STANDBY_MAX StandbyTime = 0x07 )
BME280 Standby time
func (StandbyTime) String ¶
func (t StandbyTime) String() string
Click to show internal directories.
Click to hide internal directories.