Component: Barometer (BME280) (Environmental)
Author | Matrix TSL |
Version | 1.3 |
Category | Environmental |
Contents
Barometer (BME280) component
A small PCB surface mount barometric pressure sensor with a I2C bus interface. Pressure range 300 to 1100 hPa. Temperature range -40 to +85 °C. Works with I2C interface only.
Component Source Code
Please click here for the component source code: FC_Comp_Source_Pressure_Sensor_BME280.fcfx
Detailed description
No detailed description exists yet for this component
Examples
BME280 Barometer plus Altitude v1.0
This example reads and displays the pressure, temperature & humidity.
If the pressure is increasing then Rise will be displayed.
Alternatively if the pressure is falling, then Fall will be displayed.
The altitude displayed is calculated based on the current pressure reading.
What makes the altitude useful is the ability to tare it, then after going up or downstairs for example the feet & meters are displayed.
Note since the altitude is calculated based on pressure, then if the sensor is left at the same height, the height displayed can be different each day.
Circuit Diagram
Downloadable macro reference
![]() |
ReadPressureFloat |
Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value. | |
![]() |
Return |
![]() |
Reset |
Resets the device | |
![]() |
Return |
![]() |
I2C_Read_Register |
Reads a byte value from a register on the device | |
![]() |
Address |
![]() |
Return |
![]() |
Forced_Read |
![]() |
Return |
![]() |
I2C_Write_Register |
Writes a byte value to a register on the device | |
![]() |
Address |
![]() |
Value |
![]() |
Return |
![]() |
ReadHumidityFloat |
Reads the humidity as a floating point value in percentage 0-100%. Calls the ReadHumidityRaw function and then converts to a meaningful value. | |
![]() |
Return |
![]() |
Uninit |
Uninitialse and release I2C resources | |
![]() |
Return |
![]() |
Initialise |
Starts up the I2C bus and initialises the pressure sensor ready for use. Returns 1 for a sucessful startup. Returns 0 for a failed startup or no device detected. | |
![]() |
Return |