Adafruit 9DOF - L3GD20H Driver

Dependents:   Galileo_HoverBoardRider projetinterface MAINTEST Test_gyro

Embed: (wiki syntax)

« Back to documentation index

L3GD20H Class Reference

L3GD20H Class Reference

Interface library for the ST L3GD20 3-axis gyro. More...

#include <L3GD20H.h>

Public Member Functions

 L3GD20H (PinName sda, PinName scl)
 Create a new L3GD20 I2C interface.
bool read (short g[3])
 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 L3GD20H.h.


Constructor & Destructor Documentation

L3GD20H ( PinName  sda,
PinName  scl 
)

Create a new L3GD20 I2C interface.

Parameters:
sdais the pin for the I2C SDA line
sclis the pin for the I2C SCL line

Definition at line 45 of file L3GD20H.cpp.


Member Function Documentation

bool read ( short  g[3] )

Read gyro values.

Parameters:
gArray containing x, y, and z gyro values
Returns:
g Array containing x, y, and z gyro values

Definition at line 63 of file L3GD20H.cpp.