RoverGY521 is a class that is inherited from RoverSensor abstract class. RoverGY521 class contains member functions and variables to set up and read from GY521 accelerometer that is embedded on the rover.
More...
#include <rover_gy521.hpp>
RoverGY521 is a class that is inherited from RoverSensor abstract class. RoverGY521 class contains member functions and variables to set up and read from GY521 accelerometer that is embedded on the rover.
rover::RoverGY521::RoverGY521 |
( |
| ) |
|
|
explicit |
rover::RoverGY521::RoverGY521 |
( |
const int |
custom_i2c_address | ) |
|
|
explicit |
Assigning Constructor for the RoverGY521 class.
- Parameters
-
custom_i2c_address | Custom I2C address to initialize RoverGY521 sensor with. |
rover::RoverGY521::~RoverGY521 |
( |
| ) |
|
int8_t rover::RoverGY521::getAccelX |
( |
void |
| ) |
|
Returns accelerometer output for X-axis.
- Returns
- accelerometer_x_output
int8_t rover::RoverGY521::getAccelY |
( |
void |
| ) |
|
Returns accelerometer output for Y-axis.
- Returns
- accelerometer_y_output
int8_t rover::RoverGY521::getAccelZ |
( |
void |
| ) |
|
Returns accelerometer output for Z-axis.
- Returns
- accelerometer_z_output
float rover::RoverGY521::getAngleX |
( |
void |
| ) |
|
Returns angle in the X-axis.
- Returns
- angle_x
float rover::RoverGY521::getAngleY |
( |
void |
| ) |
|
Returns angle in the Y-axis.
- Returns
- angle_y
float rover::RoverGY521::getAngleZ |
( |
void |
| ) |
|
Returns angle in the Z-axis.
- Returns
- angle_z
int8_t rover::RoverGY521::getGyroX |
( |
void |
| ) |
|
Returns gyroscope output for X-axis.
- Returns
- gyproscope_x_output
int8_t rover::RoverGY521::getGyroY |
( |
void |
| ) |
|
Returns gyroscope output for Y-axis.
- Returns
- gyproscope_y_output
int8_t rover::RoverGY521::getGyroZ |
( |
void |
| ) |
|
Returns gyroscope output for Z-axis.
- Returns
- gyproscope_z_output
void rover::RoverGY521::initialize |
( |
void |
| ) |
|
|
virtual |
float rover::RoverGY521::read |
( |
void |
| ) |
|
|
virtual |
int rover::RoverGY521::i2CAddress |
|
private |
I2C address for overriding.
int rover::RoverGY521::ROVERGY521_SETUP_ |
|
private |
The documentation for this class was generated from the following files: