Difference between revisions of "Component: Air Quality (BME688) (Environmental)"
Line 22: | Line 22: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 75: | Line 77: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 420: | Line 424: | ||
==Macro reference== | ==Macro reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadHumidity''' | ||
+ | |- | ||
+ | | colspan="2" | Collects the humidity and returns as a floating point value in percent. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | colspan="2" | Forced Mode = 0 / Parallel Mode = 0-2 | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTemperature''' | ||
+ | |- | ||
+ | | colspan="2" | Collects the temperature and returns as a floating point value in degrees C. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | colspan="2" | Forced Mode = 0 / Parallel Mode = 0-2 | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadGasResistance''' | ||
+ | |- | ||
+ | | colspan="2" | Reads the resistance of the gas in ohms from the last heating cycle. | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPressure''' | ||
+ | |- | ||
+ | | colspan="2" | Collects the pressure and returns as a floating point value in pascal. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | colspan="2" | Forced Mode = 0 / Parallel Mode = 0-2 | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMode''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the mode of the sensor to low power sleep, forced or parallel | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Mode | ||
+ | |- | ||
+ | | colspan="2" | 0=Sleep, 1=Forced, 2=Parallel | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PerformGasResistanceCycle''' | ||
+ | |- | ||
+ | | colspan="2" | Performs a forced heating cycle. Returns 1 for a successful cycle. Returns 0 if the heating time was not enough or the temperature was too high to reach. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" | Temperature | ||
+ | |- | ||
+ | | colspan="2" | Temperature in Celcius we want to reach, typically between 200 and 400�C | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | Duration | ||
+ | |- | ||
+ | | colspan="2" | Step duration in milliseconds, default 30 - Range: 1 to 4032 | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRegister''' | ||
+ | |- | ||
+ | | colspan="2" | A simple example showing a generic way to read a register using I2C. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Address | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRegister''' | ||
+ | |- | ||
+ | | colspan="2" | A simple example showing a generic way to write a register using I2C. | ||
+ | |- | ||
+ | |- | ||
+ | | 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%" | Data | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | ||
+ | |- | ||
+ | | colspan="2" | Initialises the I2C bus and sets up the device ready for operation. Returns 1 if the device has been found and is communicating. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Property reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | I2C Properties | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Channel | ||
+ | |- | ||
+ | | colspan="2" | Channel selection | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | SDA | ||
+ | |- | ||
+ | | colspan="2" | Pin used for SDA (data signal) | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | SDA Remap Pin | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | SCL | ||
+ | |- | ||
+ | | colspan="2" | Pin used for SCL (clock signal) | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | SCL Remap Pin | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Options | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Device Address | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Stop Delay | ||
+ | |- | ||
+ | | 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" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Baud Select | ||
+ | |- | ||
+ | | colspan="2" | Baud rate option selector | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | ||
+ | | width="90%" | Baud Rate | ||
+ | |- | ||
+ | | colspan="2" | Baud rate to be used | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Simulate Comms | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Comms Simulation | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Scope Traces | ||
+ | |- | ||
+ | | colspan="2" | 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. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Console Data | ||
+ | |- | ||
+ | | colspan="2" | Selects if the console data is automatically generated or not | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Injector | ||
+ | |- | ||
+ | | colspan="2" | Specifies the injector component on the panel to interact with to provide comms simulation. | ||
+ | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 09:54, 27 January 2023
Author | MatrixTSL |
Version | 1.0 |
Category | Environmental |
Contents
Air Quality (BME688) component
An air quality sensor connected using a standard I2C bus. Capable of detecting indoor and outdoor air quality including CO2 H2 VOCs and VSCs.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_BME688_AirQualitySensor.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_BME688_AirQualitySensor.fcfx
Detailed description
The App Developer (Arduino Mega) component allows an Arduino Mega board to be controlled from within the Flowcode simulation runtime.
To allow Flowcode to communicate and control the Arduino Mega hardware the board must first be pre-programmed with dedicated firmware.
The firmware hex file and Flowcode source project can be downloaded from here.
Arduino Mega App Developer Firmware
More information about the workings of the firmware project can be found on the FiniteStateMachine page.
The COM port to the Arduino hardware is selected via the SCADA_Ard_Mega component COM port property.
When building the component into a App Developer project remember to expose the COM port property to allow the end user to select the correct port for the hardware.
The console window can display data in two modes which is set via a component property.
- fixed statistics showing IO / ADC inputs / PWM
- scrolling log showing all commands and returns
Examples
Pin Mapping
Here is a table showing how the App Developer Slave digital pins are mapped on the device.
App Developer Slave Digital Pin | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
Device Port Pin | E0 | E1 | E2 | E5 | G5 | E3 | H3 | H4 | H6 | H6 | B4 | B5 | B6 | B7 | J1 | J0 | H1 | H0 | D3 | D2 | D1 | D0 | A0 | A1 | A2 | A3 | A4 | A5 | A6 | A7 | C7 | C6 | C5 | C4 | C3 | C2 | C1 | C0 | D7 | G2 | G1 | G0 | L7 | L6 | L5 | L4 | L3 | L2 | L1 | L0 |
Arduino Style Pin | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
Here is a table showing how the App Developer Slave analogue pins are mapped on the device.
App Developer Slave Analogue Pin | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Device Port Pin | F0 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | K0 | K1 | K2 | K3 | K4 | K5 | K6 | K7 |
Arduino Style Pin | A0 | A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | A13 | A14 | A15 |
Here is a table showing how the App Developer Slave peripheral pins are mapped on the device.
App Developer Slave Peripheral Pin | I2C 0 SDA | I2C 0 SCL | SPI 0 MOSI | SPI 0 MISO | SPI 0 SCK | UART 0 RX | UART 0 TX | UART 1 RX | UART 1 TX | UART 2 RX | UART 2 TX | PWM 0 | PWM 1 | PWM 2 | PWM 3 | PWM 4 | PWM 5 | PWM 6 | PWM 7 | PWM 8 | PWM 9 | PWM 10 | PWM 11 | PWM 12 | PWM 13 | PWM 14 | PWM 15 |
Device Port Pin | D1 | D0 | B3 | B4 | B5 | D2 | D3 | H0 | H1 | J0 | J1 | B7 | G5 | B5 | B6 | B7 | B4 | H6 | E3 | E4 | E5 | H3 | H4 | H5 | L3 | L4 | L5 |
Arduino Style Pin | D20 | D21 | D50 | D10 | D11 | D19 | D18 | D17 | D16 | D15 | D14 | D13 | D4 | D11 | D12 | D13 | D10 | D9 | D5 | D2 | D3 | D6 | D7 | D8 | D46 | D45 | D44 |
Macro reference
![]() |
ReadHumidity |
Collects the humidity and returns as a floating point value in percent. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadTemperature |
Collects the temperature and returns as a floating point value in degrees C. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadGasResistance |
Reads the resistance of the gas in ohms from the last heating cycle. | |
![]() |
Return |
![]() |
ReadPressure |
Collects the pressure and returns as a floating point value in pascal. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
SetMode |
Sets the mode of the sensor to low power sleep, forced or parallel | |
![]() |
Mode |
0=Sleep, 1=Forced, 2=Parallel | |
![]() |
Return |
![]() |
ReadRegister |
A simple example showing a generic way to read a register using I2C. | |
![]() |
Address |
![]() |
Return |
![]() |
WriteRegister |
A simple example showing a generic way to write a register using I2C. | |
![]() |
Address |
![]() |
Data |
![]() |
Return |
![]() |
Initialise |
Initialises the I2C bus and sets up the device ready for operation. Returns 1 if the device has been found and is communicating. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
ReadHumidity |
Collects the humidity and returns as a floating point value in percent. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadTemperature |
Collects the temperature and returns as a floating point value in degrees C. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadGasResistance |
Reads the resistance of the gas in ohms from the last heating cycle. | |
![]() |
Return |
![]() |
ReadPressure |
Collects the pressure and returns as a floating point value in pascal. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
SetMode |
Sets the mode of the sensor to low power sleep, forced or parallel | |
![]() |
Mode |
0=Sleep, 1=Forced, 2=Parallel | |
![]() |
Return |
![]() |
ReadRegister |
A simple example showing a generic way to read a register using I2C. | |
![]() |
Address |
![]() |
Return |
![]() |
WriteRegister |
A simple example showing a generic way to write a register using I2C. | |
![]() |
Address |
![]() |
Data |
![]() |
Return |
![]() |
Initialise |
Initialises the I2C bus and sets up the device ready for operation. Returns 1 if the device has been found and is communicating. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
ReadHumidity |
Collects the humidity and returns as a floating point value in percent. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadTemperature |
Collects the temperature and returns as a floating point value in degrees C. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadGasResistance |
Reads the resistance of the gas in ohms from the last heating cycle. | |
![]() |
Return |
![]() |
ReadPressure |
Collects the pressure and returns as a floating point value in pascal. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
SetMode |
Sets the mode of the sensor to low power sleep, forced or parallel | |
![]() |
Mode |
0=Sleep, 1=Forced, 2=Parallel | |
![]() |
Return |
![]() |
ReadRegister |
A simple example showing a generic way to read a register using I2C. | |
![]() |
Address |
![]() |
Return |
![]() |
WriteRegister |
A simple example showing a generic way to write a register using I2C. | |
![]() |
Address |
![]() |
Data |
![]() |
Return |
![]() |
Initialise |
Initialises the I2C bus and sets up the device ready for operation. Returns 1 if the device has been found and is communicating. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
ReadHumidity |
Collects the humidity and returns as a floating point value in percent. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadTemperature |
Collects the temperature and returns as a floating point value in degrees C. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadGasResistance |
Reads the resistance of the gas in ohms from the last heating cycle. | |
![]() |
Return |
![]() |
ReadPressure |
Collects the pressure and returns as a floating point value in pascal. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
SetMode |
Sets the mode of the sensor to low power sleep, forced or parallel | |
![]() |
Mode |
0=Sleep, 1=Forced, 2=Parallel | |
![]() |
Return |
![]() |
ReadRegister |
A simple example showing a generic way to read a register using I2C. | |
![]() |
Address |
![]() |
Return |
![]() |
WriteRegister |
A simple example showing a generic way to write a register using I2C. | |
![]() |
Address |
![]() |
Data |
![]() |
Return |
![]() |
Initialise |
Initialises the I2C bus and sets up the device ready for operation. Returns 1 if the device has been found and is communicating. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
ReadHumidity |
Collects the humidity and returns as a floating point value in percent. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadTemperature |
Collects the temperature and returns as a floating point value in degrees C. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
ReadGasResistance |
Reads the resistance of the gas in ohms from the last heating cycle. | |
![]() |
Return |
![]() |
ReadPressure |
Collects the pressure and returns as a floating point value in pascal. | |
![]() |
Index |
Forced Mode = 0 / Parallel Mode = 0-2 | |
![]() |
Return |
![]() |
SetMode |
Sets the mode of the sensor to low power sleep, forced or parallel | |
![]() |
Mode |
0=Sleep, 1=Forced, 2=Parallel | |
![]() |
Return |
![]() |
ReadRegister |
A simple example showing a generic way to read a register using I2C. | |
![]() |
Address |
![]() |
Return |
![]() |
WriteRegister |
A simple example showing a generic way to write a register using I2C. | |
![]() |
Address |
![]() |
Data |
![]() |
Return |
![]() |
Initialise |
Initialises the I2C bus and sets up the device ready for operation. Returns 1 if the device has been found and is communicating. | |
![]() |
Return |