https://github.com/maciej/bme280
BME280 driver written in Go
https://github.com/maciej/bme280
bme280 go golang
Last synced: 12 months ago
JSON representation
BME280 driver written in Go
- Host: GitHub
- URL: https://github.com/maciej/bme280
- Owner: maciej
- License: apache-2.0
- Created: 2018-02-15T15:28:25.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-14T21:15:06.000Z (about 6 years ago)
- Last Synced: 2025-03-27T14:07:00.140Z (about 1 year ago)
- Topics: bme280, go, golang
- Language: Go
- Size: 15.6 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# BME280 driver
[](https://godoc.org/github.com/maciej/bme280)
[](https://travis-ci.org/maciej/bme280)
Go driver for the Bosch BME280 sensor.
## Example
```go
// 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
* [Datasheet](http://datasheet.octopart.com/BME280-Bosch-Tools-datasheet-101965457.pdf)
* [Reference driver](https://github.com/BoschSensortec/BME280_driver)
* [quhar/bme280](https://github.com/quhar/bme280) - another BME280 driver written in Go worth considering
* [periph.io](https://periph.io) - if you're considering to use a whole low-level peripherals library in Go
(it has BME280 support)