SHT3X device driver for Arduino.
More...
#include <PWFusion_SHT3X.h>
|
| PWFusion_SHT3X (TwoWire *pWire=&Wire) |
| Construct a new pwfusion sht3x object.
|
|
bool | begin (uint8_t address) |
| Initialize device driver.
|
|
void | reset (void) |
| Soft reset the SHT3X device.
|
|
void | enableHeater () |
| Enable internal heater. See datasheet for more information.
|
|
void | disableHeater () |
| Disable internal heater. See datasheet for more information.
|
|
PWFusion_SHT3X_Data | measure () |
| Perform a one-shot measurement on the device and return the results.
|
|
void | writeCmd (uint16_t cmd) |
| Write an I2C command to the device. See datasheet for more information.
|
|
SHT3X device driver for Arduino.
◆ PWFusion_SHT3X()
PWFusion_SHT3X::PWFusion_SHT3X |
( |
TwoWire * |
pWire = &Wire | ) |
|
Construct a new pwfusion sht3x object.
- Parameters
-
pWire | Desired Wire interface. Typically left to default (&Wire ) in order to use hardware I2C |
◆ begin()
bool PWFusion_SHT3X::begin |
( |
uint8_t |
address | ) |
|
Initialize device driver.
- Parameters
-
address | Address device is at. Either SHT3X_ADDR_PRIMARY or SHT3X_ADDR_SECONDARY depending on connection of the ADDR pin, and status of solder jumper. See macros for more info |
- Returns
- true Device started up OK
-
false Error trying to initialize device. Check wiring
◆ disableHeater()
void PWFusion_SHT3X::disableHeater |
( |
| ) |
|
Disable internal heater. See datasheet for more information.
◆ enableHeater()
void PWFusion_SHT3X::enableHeater |
( |
| ) |
|
Enable internal heater. See datasheet for more information.
◆ measure()
Perform a one-shot measurement on the device and return the results.
- Returns
- PWFusion_SHT3X_Data Measurement data. Ensure to check "error" member in case there was an error trying to get data.
◆ reset()
void PWFusion_SHT3X::reset |
( |
void |
| ) |
|
Soft reset the SHT3X device.
◆ writeCmd()
void PWFusion_SHT3X::writeCmd |
( |
uint16_t |
cmd | ) |
|
Write an I2C command to the device. See datasheet for more information.
- Parameters
-
cmd | 16-bit command to send. |
The documentation for this class was generated from the following files: