Difference between revisions of "Component: Barometer (BMP280 / Grove 101020192) (101020192) (Environmental)"

From Flowcode Help
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 73: Line 73:
  
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
 +
 +
 +
 +
 +
 +
  
  
Line 81: Line 87:
 
==Macro reference==
 
==Macro reference==
  
===ReadPressureFloat===
+
===Altitude===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPressureFloat'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Altitude'''
 
|-
 
|-
| colspan="2" | Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value.&nbsp;
+
| colspan="2" | Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa. &nbsp;
 
|-
 
|-
 
|-
 
|-
Line 95: Line 101:
  
  
===Reset===
+
===Forced_Read===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reset'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forced_Read'''
 
|-
 
|-
| colspan="2" | Resets the device&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
 
|-
 
|-
Line 128: Line 134:
  
  
===ReadTemperatureFloat===
+
===I2C_Write_Register===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTemperatureFloat'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Write_Register'''
 +
|-
 +
| colspan="2" | Writes a byte value to a register on the device&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | &nbsp;
 
|-
 
|-
| 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.&nbsp;
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Value
 
|-
 
|-
 +
| colspan="2" | &nbsp;
 
|-
 
|-
| 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-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===Altitude===
+
===Initialise===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Altitude'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| colspan="2" | Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa. &nbsp;
+
| 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.&nbsp;
 
|-
 
|-
 
|-
 
|-
| 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-u8-icon.png]] - BYTE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===Forced_Read===
+
===ReadPressureFloat===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forced_Read'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPressureFloat'''
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| 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''
 
|}
 
|}
  
  
===I2C_Write_Register===
+
===ReadTemperatureFloat===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Write_Register'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTemperatureFloat'''
 
|-
 
|-
| colspan="2" | Writes a byte value to a register on the device&nbsp;
+
| 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.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Address
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Value
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
|}
  
  
===Initialise===
+
===Reset===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reset'''
 
|-
 
|-
| 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.&nbsp;
+
| colspan="2" | Resets the device&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| 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''
 
|}
 
|}
 
 
  
  

Latest revision as of 13:10, 7 February 2023

Author Matrix TSL
Version 1.2
Category Environmental


Barometer (BMP280 / Grove 101020192) 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_Grove_Barometer_Sensor_BMP280.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_Grove_Barometer_Sensor_BMP280.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

Altitude

Fc9-comp-macro.png Altitude
Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa.  
Fc9-f32-icon.png - FLOAT Return


Forced_Read

Fc9-comp-macro.png Forced_Read
 
Fc9-void-icon.png - VOID Return


I2C_Read_Register

Fc9-comp-macro.png I2C_Read_Register
Reads a byte value from a register on the device 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Return


I2C_Write_Register

Fc9-comp-macro.png I2C_Write_Register
Writes a byte value to a register on the device 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Value
 
Fc9-void-icon.png - VOID Return


Initialise

Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Return


ReadPressureFloat

Fc9-comp-macro.png ReadPressureFloat
Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value. 
Fc9-f32-icon.png - FLOAT Return


ReadTemperatureFloat

Fc9-comp-macro.png 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. 
Fc9-f32-icon.png - FLOAT Return


Reset

Fc9-comp-macro.png Reset
Resets the device 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png I2C Properties
Fc9-type-16-icon.png Slave Address
 
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-type-7-icon.png Stop Delay
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.  
Fc9-conn-icon.png Sensor Properties
Fc9-type-16-icon.png Compensation
Compensation formulas in double precision floating point or 32 bit fixed point 
Fc9-type-16-icon.png Humidity Oversampling
 
Fc9-type-16-icon.png Pressure Oversampling
 
Fc9-type-16-icon.png Temperature Oversampling
 
Fc9-type-16-icon.png Mode
 
Fc9-type-16-icon.png Standby Normal Mode (ms)
 
Fc9-type-16-icon.png Filter Coefficient
 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Simulate Comms
Allows the simulation data to come from the panel GUI or relayed via an injector component.