Public Functions

  Name
  BME()
bool begin(uint8t ADR =0x77)
Initialize the BME280.
float getPressure()
Atmospheric pressure.
float getHumidity()
Relative humidity.
float getTemperature()
Air temperature.
size_t printDataHeader(Print & out)
Print the Northern Widget columns into any Print: a File to reach the card, Serial to reach the monitor.
size_t printDataRow(Print & out)
Print pressure, humidity and temperature in printDataHeader()’s order, each followed by a comma. Takes no reading.
void beginRawReadings()
Prepare for raw reading collection.
uint16_t takeRawReading(char * buf, uint16_t offset)
Take one raw reading and write CSV data into buf at offset. Writes: pressure [mBar], humidity [%], temperature [°C], each followed by a comma. Max bytes written per call: 24.
void endRawReadings()
End raw reading collection.

Public Functions Documentation

function BME

BME()

function begin

bool begin(
    uint8_t ADR_ =0x77
)

Initialize the BME280.

Parameters:

  • ADR_ I2C address (default 0x77).

Return: true if sensor found and initialized successfully.

function getPressure

float getPressure()

Atmospheric pressure.

Return: Pressure in mBar.

function getHumidity

float getHumidity()

Relative humidity.

Return: Humidity in %.

function getTemperature

float getTemperature()

Air temperature.

Return: Temperature in °C.

function printDataHeader

size_t printDataHeader(
    Print & out
)

Print the Northern Widget columns into any Print: a File to reach the card, Serial to reach the monitor.

Return: Bytes printed: “Pressure Atmos [mBar],Humidity [%],Temp Atmos [C],”

function printDataRow

size_t printDataRow(
    Print & out
)

Print pressure, humidity and temperature in printDataHeader()’s order, each followed by a comma. Takes no reading.

function beginRawReadings

void beginRawReadings()

Prepare for raw reading collection.

function takeRawReading

uint16_t takeRawReading(
    char * buf,
    uint16_t offset
)

Take one raw reading and write CSV data into buf at offset. Writes: pressure [mBar], humidity [%], temperature [°C], each followed by a comma. Max bytes written per call: 24.

Parameters:

  • buf Caller-managed destination buffer.
  • offset Starting write position in buf.

Return: New offset after writing.

function endRawReadings

void endRawReadings()

End raw reading collection.


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