Component: Barometer (BMP180) (Environmental): Difference between revisions
Appearance
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (13 intermediate revisions by 2 users not shown) | |||
| Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
Please click here | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Pressure_Sensor_BMP180.fcfx FC_Comp_Source_Pressure_Sensor_BMP180.fcfx] | ||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Pressure_Sensor_BMP180.fcfx FC_Comp_Source_Pressure_Sensor_BMP180.fcfx] | |||
==Detailed description== | ==Detailed description== | ||
| Line 38: | Line 48: | ||
==Examples== | ==Examples== | ||
| Line 54: | Line 72: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
==Macro reference== | ==Macro reference== | ||
{| class="wikitable | ===Altitude=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Altitude''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa. | ||
|- | |- | ||
|- | |- | ||
| Line 70: | Line 99: | ||
{| class="wikitable | ===Forced_Read=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Forced_Read''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
|- | |- | ||
| Line 83: | Line 113: | ||
{| class="wikitable | ===I2C_Read_Register=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''I2C_Read_Register''' | ||
|- | |- | ||
| colspan="2" | Reads a byte value from a register on the device | | colspan="2" | Reads a byte value from a register on the device | ||
| Line 101: | Line 132: | ||
{| class="wikitable | ===I2C_Write_Register=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''I2C_Write_Register''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Writes a byte value to a register on the device | ||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Address | |||
|- | |||
| colspan="2" | | |||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Value | |||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | colspan="2" | | ||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===Initialise=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | 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. | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===ReadPressureFloat=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadPressureFloat''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value. | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===ReadTemperatureFloat=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadTemperatureFloat''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | 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. | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===Reset=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Reset''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Resets the device | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | I2C Properties | ||
|- | |- | ||
|- | |- | ||
| Line 225: | Line 259: | ||
| colspan="2" | 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. | | colspan="2" | 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. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Sensor Properties | ||
|- | |- | ||
|- | |- | ||
| Line 264: | Line 298: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Simulation | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:36, 13 July 2026
| Author | Matrix TSL |
| Version | 1.1 |
| Category | Environmental |
Barometer (BMP180) component
Barometric pressure sensor with a I2C bus interface. Pressure range 300 to 1100 hPa. Temperature range -40 to +85 °C.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Pressure_Sensor_BMP180.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Pressure_Sensor_BMP180.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
Altitude
| Altitude | |
| Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa. | |
| Return | |
Forced_Read
| Forced_Read | |
| Return | |
I2C_Read_Register
| I2C_Read_Register | |
| Reads a byte value from a register on the device | |
| Address | |
| Return | |
I2C_Write_Register
| I2C_Write_Register | |
| Writes a byte value to a register on the device | |
| Address | |
| Value | |
| Return | |
Initialise
| 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 | |
ReadPressureFloat
| ReadPressureFloat | |
| Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value. | |
| Return | |
ReadTemperatureFloat
Reset
| Reset | |
| Resets the device | |
| Return | |