BME280 pressure, temperature and humidity sensor
Constructor to create BME280 sensor
arObj - the arduino parent object
propertyname, propertyvalue - optional property name, value pairs. Current known properties are: Current properties are:
I2C address of the sensor (default 0x40)
I2C bus - 0 or 1 (default 0)
obj - created object
a = arduino()
sensor = bme280(a)
Read the temperature
obj - the sensor object
C - read temperature in deg C.
timestamp - timestamp when read
a = arduino()
s = bme280(a)
# get temp
temp = s.readTemperature
See also: bme280.
Read the relative humidity
obj - the sensor object
relH - relative humidity as a percentage (0 - 100.0)
timestamp - timestamp when read
Read the pressure
obj - the sensor object
P - pressure reading from sensor.
timestamp - timestamp when read
Read the sensor data
obj - the sensor object
P - pressure reading from sensor.
H - humidity reading from sensor.
C - temperature reading from sensor.
timestamp - timestamp when read
overrun - overrun flag.
readings - table structure with fields for Timestamp, Pressure, Temperature and Humidity.
Read the sensor info
obj - the sensor object
inf - structure containing the sensor information.
Structure fields are:
Chip firmware version
sensor id value
sensor type ’bme280’
Status value read from sensor
Flush sensor data
obj - the sensor object
None
Release the resources of the sensor
obj - the sensor object
None
Package: arduino