My attempt to make a better lib (in development)
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. | |
| ~L3GD20 () | |
| Destructor of the class. | |
| 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 83 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 44 of file L3GD20.cpp.
| ~L3GD20 | ( | ) |
Destructor of the class.
Definition at line 60 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 91 of file L3GD20.cpp.
Generated on Wed Jul 20 2022 12:14:40 by
1.7.2
Alexandre Salconi-Denis
