/bme280

BME280 driver written in Go

Primary LanguageGoApache License 2.0Apache-2.0

BME280 driver

GoDoc Build Status

Go driver for the Bosch BME280 sensor.

Example

// Error handling is omitted
device, err := i2c.Open(&i2c.Devfs{Dev: "/dev/i2c-1"}, bme280.I2CAddr)
driver := bme280.New(device)
err = driver.InitWith(bme280.ModeForced, bme280.Settings{
		Filter:                  bme280.FilterOff,
		Standby:                 bme280.StandByTime1000ms,
		PressureOversampling:    bme280.Oversampling16x,
		TemperatureOversampling: bme280.Oversampling16x,
		HumidityOversampling:    bme280.Oversampling16x,
	})

response, err := driver.Read()

References