Classes

  Name
class BME

Source code

/******************************************************************************
NW_BME280.h — NW_BME280
Northern Widget interface for the Bosch BME280 temperature, humidity,
and pressure sensor.

Bobby Schulz @ Northern Widget LLC

Wraps the Adafruit BME280 library to provide the Northern Widget sensor
API: begin(), printDataHeader(), printDataRow(), and the raw readings interface.
Returns atmospheric pressure in mBar, relative humidity in %, and
temperature in °C.

Distributed as-is; no warranty is given.
******************************************************************************/

#ifndef NW_BME280_h
#define NW_BME280_h

#include "Arduino.h"
#include <Adafruit_BME280.h>

class BME {
public:
  BME();

  bool begin(uint8_t ADR_ = 0x77);

  float getPressure();

  float getHumidity();

  float getTemperature();

  size_t printDataHeader(Print& out);

  size_t printDataRow(Print& out);

  void beginRawReadings();

  uint16_t takeRawReading(char* buf, uint16_t offset);

  void endRawReadings();

private:
  Adafruit_BME280 Sensor;
  uint8_t ADR = 0x77;
};

#endif

Updated on 2026-10-04 at 04:51:46 +0000