東北大学学友会準加盟団体 From The Earth の高高度ロケットFTE-06(通称:海豚)にて使用したソフトウェアです.ご自由にお使いください.このプログラムによって生じた損害について当団体は一切責任を負いません.また,各モジュールのライブラリは当団体が作成したものではないので再配布は禁止します.

Dependencies:   mbed FATFileSystem

Fork of FTE-06 by Tetsushi Amano

Embed: (wiki syntax)

« Back to documentation index

L3GD20 Class Reference

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 80 of file L3GD20.h.


Constructor & Destructor Documentation

L3GD20 ( 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 L3GD20.cpp.


Member Function Documentation

bool read ( float *  gx,
float *  gy,
float *  gz 
)

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 66 of file L3GD20.cpp.