BuildAzure / BuildAzure.IoT.Adafruit.BME280

An Adafruit BME280 (Pressure, Temp & Humidity) Sensor library for Windows IoT Core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BuildAzure.IoT.Adafruit.BME280

An Adafruit BME280 (Pressure, Temp & Humidity) Sensor library for Windows IoT Core

Nuget Package

BuildAzure.IoT.Adafruit.BME280 Nuget Package

C# Usage

var bme280Sensor = new BME280Sensor();

// Initialize BME280 Sensor
await bme280Sensor.Initialize();

// Read Temperature
var temp = bme280Sensor.ReadTemperature();

// Read Humidity
var humidity = bme280Sensor.ReadHumidity();

// Read Barometric Pressure
var pressure = bme280Sensor.ReadPressure();

// Read Altitude
const float seaLevelBarometricPressure = 1022.00f;
var altitude = bmd280Sensor.ReadAltitude(seaLevelBarometricPressure);

Wiring Diagram

Here's a simple Fritzing diagram that shows the expected wiring of the Adafruit BME280 sensor with a Raspberry Pi 2 or 3:

BMD280 Raspberry Pi Wiring Diagram

Examples

The Weather Station V 3.0 project on Hackster.io provides a simple tutorial on using this library in a new UWP app. Also, the full source code for that project is available at the following location:

https://github.com/BuildAzure/AdafruitBME280WeatherStation

Origins

This code was originally posted as part of the Weather Station V 2.0 project on hackster.io. Since that project wasn't released using any reusable Nuget libraries for working with the Adafruit BME280 sensor, this project was created to borrow the BME280 code and release that out as a Nuget package for others to consume. Thankfully it's all licensed under the MIT License, and so is this project!

About

An Adafruit BME280 (Pressure, Temp & Humidity) Sensor library for Windows IoT Core

License:MIT License


Languages

Language:C# 97.9%Language:Batchfile 2.1%