Javascript wrappers for HTS221 Sensor library
Dependencies: HTS221
HTS221_JS Class Reference
Abstract class of an HTS221 Humidity and Temperature sensor for Javascript. More...
#include <HTS221_JS.h>
Public Member Functions | |
| HTS221_JS (DevI2C &devI2c) | |
| Constructor. | |
| void | init (DevI2C &devI2c) |
| init | |
| HTS221_JS (DevI2C &devI2c, uint8_t address, PinName drdy_pin) | |
| Constructor. | |
| void | init (DevI2C &devI2c, uint8_t address, PinName drdy_pin) |
| init | |
| HTS221_JS (SPI &spi) | |
| Constructor. | |
| void | init (SPI &spi) |
| init | |
| HTS221_JS (SPI &spi, PinName cs_pin, PinName drdy_pin) | |
| Constructor. | |
| void | init (SPI &spi, PinName cs_pin, PinName drdy_pin) |
| init | |
| ~HTS221_JS () | |
| Destructor. | |
| uint8_t | readID () |
| Read ID address of HTS221. | |
| float | get_temperature () |
| Get the temperature reading from HTS221. | |
| char * | get_temperature_string (char *) |
| Get the temperature reading from HTS221. | |
| float | get_humidity () |
| Get the humidity reading from HTS221. | |
| char * | get_humidity_string (char *) |
| Get the humidity reading from HTS221. | |
Detailed Description
Abstract class of an HTS221 Humidity and Temperature sensor for Javascript.
Definition at line 56 of file HTS221_JS.h.
Constructor & Destructor Documentation
| HTS221_JS | ( | DevI2C & | devI2c ) |
Constructor.
Initializing the component.
- Parameters:
-
devI2c object of an helper class which handles the DevI2C peripheral
Definition at line 89 of file HTS221_JS.cpp.
| HTS221_JS | ( | DevI2C & | devI2c, |
| uint8_t | address, | ||
| PinName | drdy_pin | ||
| ) |
Constructor.
Initializing the component.
- Parameters:
-
devI2c object of an helper class which handles the DevI2C peripheral address drdy pin
Definition at line 109 of file HTS221_JS.cpp.
| HTS221_JS | ( | SPI & | spi ) |
Constructor.
Initializing the component.
- Parameters:
-
spi object of an helper class which handles the SPI peripheral
Definition at line 129 of file HTS221_JS.cpp.
| HTS221_JS | ( | SPI & | spi, |
| PinName | cs_pin, | ||
| PinName | drdy_pin | ||
| ) |
Constructor.
Initializing the component.
- Parameters:
-
spi object of an helper class which handles the SPI peripheral cs pin drdy pin
Definition at line 149 of file HTS221_JS.cpp.
| ~HTS221_JS | ( | ) |
Destructor.
Recycle the component. Deletes the Sensor Object
Definition at line 169 of file HTS221_JS.cpp.
Member Function Documentation
| float get_humidity | ( | ) |
Get the humidity reading from HTS221.
- Return values:
-
Humidity value
Definition at line 210 of file HTS221_JS.cpp.
| char * get_humidity_string | ( | char * | buffer ) |
Get the humidity reading from HTS221.
- Return values:
-
Humidity value in string
Definition at line 220 of file HTS221_JS.cpp.
| float get_temperature | ( | ) |
Get the temperature reading from HTS221.
- Return values:
-
Temperature value
Definition at line 189 of file HTS221_JS.cpp.
| char * get_temperature_string | ( | char * | buffer ) |
Get the temperature reading from HTS221.
- Return values:
-
Temperature value in string
Definition at line 199 of file HTS221_JS.cpp.
| void init | ( | DevI2C & | devI2c ) |
init
Initializing the component.
- Parameters:
-
devI2c object of an helper class which handles the DevI2C peripheral
Definition at line 97 of file HTS221_JS.cpp.
| void init | ( | DevI2C & | devI2c, |
| uint8_t | address, | ||
| PinName | drdy_pin | ||
| ) |
init
Initializing the component.
- Parameters:
-
devI2c object of an helper class which handles the DevI2C peripheral address drdy pin
Definition at line 119 of file HTS221_JS.cpp.
| void init | ( | SPI & | spi, |
| PinName | cs_pin, | ||
| PinName | drdy_pin | ||
| ) |
init
Initializing the component.
- Parameters:
-
spi object of an helper class which handles the SPI peripheral cs pin drdy pin
Definition at line 159 of file HTS221_JS.cpp.
| void init | ( | SPI & | spi ) |
init
Initializing the component.
- Parameters:
-
spi object of an helper class which handles the SPI peripheral
Definition at line 137 of file HTS221_JS.cpp.
| uint8_t readID | ( | ) |
Read ID address of HTS221.
- Return values:
-
The ID of the Sensor
Definition at line 179 of file HTS221_JS.cpp.
Generated on Wed Jul 13 2022 23:45:04 by
1.7.2