Class that stores state and functions for interacting with Si7021 Sensor.
More...
#include <Adafruit_Si7021.h>
Class that stores state and functions for interacting with Si7021 Sensor.
◆ Adafruit_Si7021()
Adafruit_Si7021::Adafruit_Si7021 |
( |
TwoWire * |
theWire = &Wire | ) |
|
Instantiates a new Adafruit_Si7021 class.
- Parameters
-
*theWire | optional wire object |
◆ begin()
bool Adafruit_Si7021::begin |
( |
| ) |
|
Sets up the HW by reseting It, reading serial number and reading revision.
- Returns
- Returns true if set up is successful.
◆ readTemperature()
float Adafruit_Si7021::readTemperature |
( |
| ) |
|
Reads the temperature value from Si7021 (No Master hold)
- Returns
- Returns temperature as float value or NAN when there is error timeout
◆ readHumidity()
float Adafruit_Si7021::readHumidity |
( |
| ) |
|
Reads the humidity value from Si7021 (No Master hold)
- Returns
- Returns humidity as float value or NAN when there is error timeout
◆ heater()
void Adafruit_Si7021::heater |
( |
bool |
h | ) |
|
Enable/Disable the sensor heater.
Enable/Disable sensor heater.
- Parameters
-
h | True to enable the heater, False to disable it. |
◆ isHeaterEnabled()
bool Adafruit_Si7021::isHeaterEnabled |
( |
| ) |
|
Return sensor heater state.
- Returns
- heater state (TRUE = enabled, FALSE = disabled)
◆ setHeatLevel()
void Adafruit_Si7021::setHeatLevel |
( |
uint8_t |
level | ) |
|
Set the sensor heater heat level.
- Parameters
-
level | is a si_heatLevel that represents the heat level |
◆ getRevision()
uint8_t Adafruit_Si7021::getRevision |
( |
| ) |
|
|
inline |
Returns sensor revision established during init.
- Returns
- model value
◆ getModel()
Returns sensor model established during init.
- Returns
- model value
◆ sernum_a
uint32_t Adafruit_Si7021::sernum_a |
◆ sernum_b
uint32_t Adafruit_Si7021::sernum_b |
The documentation for this class was generated from the following files: