unterwasserman
Fork of L3GD20 by
L3GD20 Class Reference
Interface library for the ST L3GD20 3-axis gyro. More...
#include <L3GD20.h>
Public Member Functions | |
L3GD20 (PinName sda, PinName scl) | |
Create a new L3GD20 I2C interface. | |
bool | read (float *gx, float *gy, float *gz) |
Read gyro values. |
Detailed Description
Interface library for the ST L3GD20 3-axis gyro.
Ported from Pololu L3GD20 library for Arduino by
#include "mbed.h" #include "L3GD20.h" L3GD20 gyro(p28, p27); ... int g[3]; gyro.read(g);
Definition at line 79 of file L3GD20.h.
Constructor & Destructor Documentation
L3GD20 | ( | PinName | sda, |
PinName | scl | ||
) |
Create a new L3GD20 I2C interface.
- Parameters:
-
sda is the pin for the I2C SDA line scl is the pin for the I2C SCL line
Definition at line 47 of file L3GD20.cpp.
Member Function Documentation
bool read | ( | float * | gx, |
float * | gy, | ||
float * | gz | ||
) |
Read gyro values.
- Parameters:
-
g Array containing x, y, and z gyro values
- Returns:
- g Array containing x, y, and z gyro values
Definition at line 65 of file L3GD20.cpp.
Generated on Mon Aug 8 2022 02:44:08 by 1.7.2