Component: Barometer (BME280) (Sensors)
Author | Matrix TSL |
Version | 1.3 (Release) |
Category | Sensors |
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.
Examples
No additional examples
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.
Parameters
- This macro has no parameters
Return value
Reset
Resets the device
Parameters
- This macro has no parameters
Return value
- This call does not return a value
I2C_Read_Register
Reads a byte value from a register on the device
Parameters
- BYTE Address
Return value
ReadTemperatureFloat
Reads the temperature as a floating point value in °C.
Resultion sets the return bit value and conversion time.
Calls the ReadTemperatureRaw function and then converts to a meaningful value.
Parameters
- This macro has no parameters
Return value
Forced_Read
No additional information
Parameters
- This macro has no parameters
Return value
- This call does not return a value
I2C_Write_Register
Writes a byte value to a register on the device
Parameters
- BYTE Address
- BYTE Value
Return value
- This call does not return a value
ReadHumidityFloat
Reads the humidity as a floating point value in percentage 0-100%.
Calls the ReadHumidityRaw function and then converts to a meaningful value.
Parameters
- This macro has no parameters
Return value
Uninit
Uninitialse and release I2C resources
Parameters
- This macro has no parameters
Return value
- This call does not return a value
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.
Parameters
- This macro has no parameters
Return value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Slave Address
This property is of type Fixed list of ints and can be referenced with the variable name SlaveAddress.
No additional information
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c1::CHANNEL.
Channel selection
Baud Select
This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c1::BAUD_LIST.
Baud rate option selector
Baud Rate
This property is of type Signed integer and can be referenced with the variable name cal_i2c1::BAUD.
Baud rate to be used
Stop Delay
This property is of type True or false and can be referenced with the variable name cal_i2c1::StopDel.
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not
a 10ms delay between an I2C stop event and the next I2C start event.
Most modern microcontrollers will not have a problem so this property can be disabled to speed up the
I2C communications.
SDA
This property is of type Single digital pin and can be referenced with the variable name cal_i2c1::SDA.
Pin used for SDA (data signal)
SCL
This property is of type Single digital pin and can be referenced with the variable name cal_i2c1::SCL.
Pin used for SCL (clock signal)
Compensation
This property is of type Fixed list of ints and can be referenced with the variable name Compensation.
Compensation formulas in double precision floating point or 32 bit fixed point
Humidity Oversampling
This property is of type Fixed list of ints and can be referenced with the variable name HO.
No additional information
Pressure Oversampling
This property is of type Fixed list of ints and can be referenced with the variable name PO.
No additional information
Temperature Oversampling
This property is of type Fixed list of ints and can be referenced with the variable name TO.
No additional information
Mode
This property is of type Fixed list of ints and can be referenced with the variable name Mode.
No additional information
Standby Normal Mode (ms)
This property is of type Fixed list of ints and can be referenced with the variable name Stby.
No additional information
Filter Coefficient
This property is of type Fixed list of ints and can be referenced with the variable name FC.
No additional information
Scope Traces
This property is of type True or false and can be referenced with the variable name cal_i2c1::ScopeTraces.
Selects if the component pin connections are automatically generated on the data recorder window or not.
Yes: Automatically add the component pins to a group on the data recorder which will reflect the sim data during simultion.
No: Do not show the pin signals on the data recorder window.
Console Data
This property is of type True or false and can be referenced with the variable name cal_i2c1::ConsoleData.
Selects if the console data is automatically generated or not
Injector
This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c1::Injector.
No additional information