Skip to content

elechouse/L3GXXX_gyroscope

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

For L3G4200D and L3GD20

Product pages

L3GD20 3-axis Gyroscope Module
LSM303DLHC+L3GD20 9DOF sensor module

Library Reference

vector g
The last values read from the gyro.
bool init(byte device, byte sa0)
Initializes the library with the device being used (L3G4200D or L3GD20) and the state of the SA0 (slave address least significant bit) pin. Constants for these arguments are defined in L3G.h. Both of these arguments are optional; if they are not specified, the library will try to automatically detect the device and slave address, and it will return a boolean indicating whether the autodetection was succesful.
void enableDefault(void)
Turns on the gyro in the default configuration.
void writeReg(byte reg, byte value)
Writes a gyro register with the given value. Register address constants are defined in L3G.h.
byte readReg(byte reg)
Reads a gyro register and returns the value read.
void read(void)
Takes a reading from the gyro and stores the values in the vector g.

About

For L3G4200D and L3GD20

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 92.0%
  • Other 8.0%