Javascript wrappers for LPS22HB Sensor library

Dependencies:   LPS22HB

Dependents:   ST_SENSOR_JS

Embed: (wiki syntax)

« Back to documentation index

LPS22HB_JS Class Reference

LPS22HB_JS Class Reference

Abstract class of an LPS22HB Humidity and Temperature sensor for Javascript. More...

#include <LPS22HB_JS.h>

Public Member Functions

 LPS22HB_JS (DevI2C &devI2c)
 Constructor.
void init (DevI2C &devI2c)
 init
 LPS22HB_JS (DevI2C &devI2c, uint8_t address, PinName int_pin)
 Constructor.
void init (DevI2C &devI2c, uint8_t address, PinName int_pin)
 init
 LPS22HB_JS (SPI &spi, PinName cs_pin)
 Constructor.
void init (SPI &spi, PinName cs_pin)
 init
 LPS22HB_JS (SPI &spi, PinName cs_pin, PinName int_pin, int spi_type)
 Constructor.
void init (SPI &spi, PinName cs_pin, PinName int_pin, int spi_type)
 init
 ~LPS22HB_JS ()
 Destructor.
uint8_t readID ()
 readID
float get_temperature ()
 get_temperature
char * get_temperature_string (char *)
 get_temperature_string
float get_pressure ()
 get_pressure
char * get_pressure_string (char *)
 get_pressure_string

Detailed Description

Abstract class of an LPS22HB Humidity and Temperature sensor for Javascript.

Definition at line 56 of file LPS22HB_JS.h.


Constructor & Destructor Documentation

LPS22HB_JS ( DevI2C &  devI2c )

Constructor.

Initializing the component.

Parameters:
DevI2cobject of helper class which handles the DevI2C peripheral

Definition at line 90 of file LPS22HB_JS.cpp.

LPS22HB_JS ( DevI2C &  devI2c,
uint8_t  address,
PinName  int_pin 
)

Constructor.

Initializing the component.

Parameters:
DevI2cobject of helper class which handles the DevI2C peripheral
Address
INTpin

Definition at line 110 of file LPS22HB_JS.cpp.

LPS22HB_JS ( SPI &  spi,
PinName  cs_pin 
)

Constructor.

Initializing the component.

Parameters:
SPIobject of helper class which handles the SPI peripheral
CSpin

Definition at line 131 of file LPS22HB_JS.cpp.

LPS22HB_JS ( SPI &  spi,
PinName  cs_pin,
PinName  int_pin,
int  spi_type 
)

Constructor.

Initializing the component.

Parameters:
SPIobject of helper class which handles the SPI peripheral
CSpin
INTpin
SPItype

Definition at line 153 of file LPS22HB_JS.cpp.

~LPS22HB_JS (  )

Destructor.

Recycling the component. Deletes the Sensor Object

Definition at line 173 of file LPS22HB_JS.cpp.


Member Function Documentation

float get_pressure (  )

get_pressure

Gets the pressure reading from LPS22HB

Return values:
Pressurevalue

Definition at line 214 of file LPS22HB_JS.cpp.

char * get_pressure_string ( char *  buffer )

get_pressure_string

Gets the pressure reading from LPS22HB

Return values:
pressurevalue in string form

Definition at line 224 of file LPS22HB_JS.cpp.

float get_temperature (  )

get_temperature

Gets the temperature reading from LPS22HB

Return values:
Temperaturevalue

Definition at line 193 of file LPS22HB_JS.cpp.

char * get_temperature_string ( char *  buffer )

get_temperature_string

Gets the temperature reading from LPS22HB

Return values:
Temperaturevalue in string form

Definition at line 203 of file LPS22HB_JS.cpp.

void init ( SPI &  spi,
PinName  cs_pin 
)

init

Initializing the component.

Parameters:
SPIobject of helper class which handles the SPI peripheral
CSpin

Definition at line 140 of file LPS22HB_JS.cpp.

void init ( SPI &  spi,
PinName  cs_pin,
PinName  int_pin,
int  spi_type 
)

init

Initializing the component.

Parameters:
SPIobject of helper class which handles the SPI peripheral
CSpin
INTpin
SPItype

Definition at line 164 of file LPS22HB_JS.cpp.

void init ( DevI2C &  devI2c,
uint8_t  address,
PinName  int_pin 
)

init

Initializing the component.

Parameters:
DevI2cobject of helper class which handles the DevI2C peripheral
Address
INTpin

Definition at line 120 of file LPS22HB_JS.cpp.

void init ( DevI2C &  devI2c )

init

Initializing the component.

Parameters:
DevI2cobject of helper class which handles the DevI2C peripheral

Definition at line 98 of file LPS22HB_JS.cpp.

uint8_t readID (  )

readID

Read ID address of LPS22HB

Return values:
TheID of the Sensor

Definition at line 183 of file LPS22HB_JS.cpp.