Javascript wrappers for HTS221 Sensor library

Dependencies:   HTS221

Dependents:   ST_SENSOR_JS

Embed: (wiki syntax)

« Back to documentation index

HTS221_JS Class Reference

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:
devI2cobject 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:
devI2cobject of an helper class which handles the DevI2C peripheral
address
drdypin

Definition at line 109 of file HTS221_JS.cpp.

HTS221_JS ( SPI &  spi )

Constructor.

Initializing the component.

Parameters:
spiobject 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:
spiobject of an helper class which handles the SPI peripheral
cspin
drdypin

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:
Humidityvalue

Definition at line 210 of file HTS221_JS.cpp.

char * get_humidity_string ( char *  buffer )

Get the humidity reading from HTS221.

Return values:
Humidityvalue in string

Definition at line 220 of file HTS221_JS.cpp.

float get_temperature (  )

Get the temperature reading from HTS221.

Return values:
Temperaturevalue

Definition at line 189 of file HTS221_JS.cpp.

char * get_temperature_string ( char *  buffer )

Get the temperature reading from HTS221.

Return values:
Temperaturevalue in string

Definition at line 199 of file HTS221_JS.cpp.

void init ( DevI2C &  devI2c )

init

Initializing the component.

Parameters:
devI2cobject 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:
devI2cobject of an helper class which handles the DevI2C peripheral
address
drdypin

Definition at line 119 of file HTS221_JS.cpp.

void init ( SPI &  spi,
PinName  cs_pin,
PinName  drdy_pin 
)

init

Initializing the component.

Parameters:
spiobject of an helper class which handles the SPI peripheral
cspin
drdypin

Definition at line 159 of file HTS221_JS.cpp.

void init ( SPI &  spi )

init

Initializing the component.

Parameters:
spiobject 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:
TheID of the Sensor

Definition at line 179 of file HTS221_JS.cpp.