DOI

NW_BME280

API Documentation

Northern Widget interface for the Bosch BME280 temperature, humidity, and pressure sensor.

This library wraps the Adafruit BME280 Library to provide the standard Northern Widget sensor API, used across all NW sensor libraries and supported natively by the Margay and Okapi data loggers.

Dependencies

API

#include <NW_BME280.h>

BME sensor;

bool  begin(uint8_t address = 0x77);  // returns false if sensor not found

float getPressure();     // atmospheric pressure, mBar
float getHumidity();     // relative humidity, %
float getTemperature();  // temperature, °C

String getHeader();      // "Pressure Atmos [mBar],Humidity [%],Temp Atmos [C],"
String getString();      // comma-separated values with trailing comma

// Raw readings interface (NW standard, buffer-based)
void     beginRawReadings();
uint16_t takeRawReading(char* buf, uint16_t offset);  // max 24 bytes per call
void     endRawReadings();

Installation

Install via the Arduino Library Manager by searching for NW_BME280, or install the Adafruit BME280 Library dependency first and then download this library manually.

Authors

Bobby Schulz, Northern Widget LLC