ST Expansion SW Team / LSM303AGR_JS

Dependencies:   LSM303AGR

Dependents:   ST_SENSOR_JS

Embed: (wiki syntax)

« Back to documentation index

LSM303AGR_JS Class Reference

LSM303AGR_JS Class Reference

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

#include <LSM303AGR_JS.h>

Public Member Functions

void init_acc (SPI &spi, PinName cs_pin)
 init_acc
void init_acc (SPI &spi, PinName cs_pin, PinName int1_pin, PinName int2_pin)
 init_acc
void init_acc (DevI2C &devI2c)
 init_acc
void init_acc (DevI2C &devI2c, PinName int1_pin, PinName int2_pin)
 init_acc
void init_acc (DevI2C &devI2c, PinName int1_pin, PinName int2_pin, uint8_t address)
 init_acc
void init_mag (SPI &spi, PinName cs_pin)
 init_mag
void init_mag (SPI &spi, PinName cs_pin, PinName int_pin)
 init_mag
void init_mag (DevI2C &devI2c)
 init_mag
void init_mag (DevI2C &devI2c, PinName int_pin)
 init_mag
void init_mag (DevI2C &devI2c, PinName int_pin, uint8_t address)
 init_mag
 ~LSM303AGR_JS ()
 Destructor.
uint8_t read_magnetometer_id ()
 Read ID address of LSM303AGR Magnetometer.
uint8_t read_accelerometer_id ()
 Read ID address of LSM303AGR Accelerometer.
int32_t * get_accelerometer_axes (int32_t *)
 Get the accleremeter reading from LSM303AGR.
char * get_accelerometer_axes_json (char *)
 Get the accleremeter reading from LSM303AGR.
int32_t * get_magnetometer_axes (int32_t *)
 Get the Magnetometer reading from LSM303AGR.
char * get_magnetometer_axes_json (char *)
 Get the Magnetometer reading from LSM303AGR.

Detailed Description

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

Definition at line 57 of file LSM303AGR_JS.h.


Constructor & Destructor Documentation

~LSM303AGR_JS (  )

Destructor.

Recycle the component. Deletes the Sensor Object

Definition at line 228 of file LSM303AGR_JS.cpp.


Member Function Documentation

int32_t * get_accelerometer_axes ( int32_t *  axes )

Get the accleremeter reading from LSM303AGR.

Return values:
Accleremetervalue

Definition at line 261 of file LSM303AGR_JS.cpp.

char * get_accelerometer_axes_json ( char *  data )

Get the accleremeter reading from LSM303AGR.

Return values:
Accleremetervalue in JSON string form

Definition at line 272 of file LSM303AGR_JS.cpp.

int32_t * get_magnetometer_axes ( int32_t *  axes )

Get the Magnetometer reading from LSM303AGR.

Return values:
Magnetometervalue

Definition at line 288 of file LSM303AGR_JS.cpp.

char * get_magnetometer_axes_json ( char *  data )

Get the Magnetometer reading from LSM303AGR.

Return values:
Magnetometervalue

Definition at line 298 of file LSM303AGR_JS.cpp.

void init_acc ( DevI2C &  devI2c )

init_acc

Initializing the component.

Parameters:
DevI2cobject of an helper class which handles the DevI2C peripheral

Definition at line 137 of file LSM303AGR_JS.cpp.

void init_acc ( SPI &  spi,
PinName  cs_pin,
PinName  int1_pin,
PinName  int2_pin 
)

init_acc

Initializing the component.

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

Definition at line 127 of file LSM303AGR_JS.cpp.

void init_acc ( DevI2C &  devI2c,
PinName  int1_pin,
PinName  int2_pin,
uint8_t  address 
)

init_acc

Initializing the component.

Parameters:
DevI2cobject of an helper class which handles the DevI2C peripheral
INT1pin
INT2pin
Address

Definition at line 162 of file LSM303AGR_JS.cpp.

void init_acc ( DevI2C &  devI2c,
PinName  int1_pin,
PinName  int2_pin 
)

init_acc

Initializing the component.

Parameters:
DevI2cobject of an helper class which handles the DevI2C peripheral
INT1pin
INT2pin

Definition at line 149 of file LSM303AGR_JS.cpp.

void init_acc ( SPI &  spi,
PinName  cs_pin 
)

init_acc

Initializing the component.

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

Definition at line 114 of file LSM303AGR_JS.cpp.

void init_mag ( DevI2C &  devI2c,
PinName  int_pin 
)

init_mag

Initializing the component.

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

Definition at line 206 of file LSM303AGR_JS.cpp.

void init_mag ( SPI &  spi,
PinName  cs_pin,
PinName  int_pin 
)

init_mag

Initializing the component.

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

Definition at line 185 of file LSM303AGR_JS.cpp.

void init_mag ( DevI2C &  devI2c )

init_mag

Initializing the component.

Parameters:
DevI2cobject of an helper class which handles the DevI2C peripheral

Definition at line 195 of file LSM303AGR_JS.cpp.

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

init_mag

Initializing the component.

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

Definition at line 218 of file LSM303AGR_JS.cpp.

void init_mag ( SPI &  spi,
PinName  cs_pin 
)

init_mag

Initializing the component.

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

Definition at line 173 of file LSM303AGR_JS.cpp.

uint8_t read_accelerometer_id (  )

Read ID address of LSM303AGR Accelerometer.

Return values:
TheID of the Sensor

Definition at line 251 of file LSM303AGR_JS.cpp.

uint8_t read_magnetometer_id (  )

Read ID address of LSM303AGR Magnetometer.

Return values:
TheID of the Sensor

Definition at line 241 of file LSM303AGR_JS.cpp.