Code for autonomous ground vehicle, Data Bus, 3rd place winner in 2012 Sparkfun AVC.
Dependencies: Watchdog mbed Schedule SimpleFilter LSM303DLM PinDetect DebounceIn Servo
L3G4200D Class Reference
Interface library for the ST L3G4200D 3-axis gyro. More...
#include <L3G4200D.h>
Public Member Functions | |
L3G4200D (PinName sda, PinName scl) | |
Create a new L3G4200D I2C interface. | |
void | read (int g[3]) |
Read gyro values. | |
byte | readTemp (void) |
Read raw temperature value. |
Detailed Description
Interface library for the ST L3G4200D 3-axis gyro.
Ported from Pololu L3G4200D library for Arduino by Michael Shimniok http://bot-thoughts.com
#include "mbed.h" #include "L3G4200D.h" L3G4200D gyro(p28, p27); ... int g[3]; gyro.read(g);
Definition at line 82 of file L3G4200D.h.
Constructor & Destructor Documentation
L3G4200D | ( | PinName | sda, |
PinName | scl | ||
) |
Create a new L3G4200D 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 L3G4200D.cpp.
Member Function Documentation
void read | ( | int | g[3] ) |
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 77 of file L3G4200D.cpp.
byte readTemp | ( | void | ) |
Read raw temperature value.
- Returns:
- temperature value in raw byte form
Definition at line 101 of file L3G4200D.cpp.
Generated on Tue Jul 12 2022 14:09:28 by 1.7.2