Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: LSM303AGR
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:
-
Accleremeter value
Definition at line 261 of file LSM303AGR_JS.cpp.
char * get_accelerometer_axes_json | ( | char * | data ) |
Get the accleremeter reading from LSM303AGR.
- Return values:
-
Accleremeter value 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:
-
Magnetometer value
Definition at line 288 of file LSM303AGR_JS.cpp.
char * get_magnetometer_axes_json | ( | char * | data ) |
Get the Magnetometer reading from LSM303AGR.
- Return values:
-
Magnetometer value
Definition at line 298 of file LSM303AGR_JS.cpp.
void init_acc | ( | DevI2C & | devI2c ) |
init_acc
Initializing the component.
- Parameters:
-
DevI2c object 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:
-
SPI object of an helper class which handles the SPI peripheral CS pin INT1 pin INT2 pin
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:
-
DevI2c object of an helper class which handles the DevI2C peripheral INT1 pin INT2 pin 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:
-
DevI2c object of an helper class which handles the DevI2C peripheral INT1 pin INT2 pin
Definition at line 149 of file LSM303AGR_JS.cpp.
void init_acc | ( | SPI & | spi, |
PinName | cs_pin | ||
) |
init_acc
Initializing the component.
- Parameters:
-
SPI object of an helper class which handles the SPI peripheral CS pin
Definition at line 114 of file LSM303AGR_JS.cpp.
void init_mag | ( | DevI2C & | devI2c, |
PinName | int_pin | ||
) |
init_mag
Initializing the component.
- Parameters:
-
DevI2c object of an helper class which handles the DevI2C peripheral INT pin
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:
-
SPI object of an helper class which handles the SPI peripheral CS pin INT pin
Definition at line 185 of file LSM303AGR_JS.cpp.
void init_mag | ( | DevI2C & | devI2c ) |
init_mag
Initializing the component.
- Parameters:
-
DevI2c object 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:
-
DevI2c object of an helper class which handles the DevI2C peripheral INT pin Address
Definition at line 218 of file LSM303AGR_JS.cpp.
void init_mag | ( | SPI & | spi, |
PinName | cs_pin | ||
) |
init_mag
Initializing the component.
- Parameters:
-
SPI object of an helper class which handles the SPI peripheral CS pin
Definition at line 173 of file LSM303AGR_JS.cpp.
uint8_t read_accelerometer_id | ( | ) |
Read ID address of LSM303AGR Accelerometer.
- Return values:
-
The ID 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:
-
The ID of the Sensor
Definition at line 241 of file LSM303AGR_JS.cpp.
Generated on Thu Jul 14 2022 02:47:33 by
