WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

getPitch

Returns the compass pitch, in degrees, at the time of the last read().
Syntax
Imu. getPitch()
Where Imu is the name you have given to the device in Project Designer.
Parameters
None
Returns
COMPASS_TYPE
Example
Assuming you have called the sensor 'myIMU' in Project Designer you can dump the value to the standard output device as follows:
myIMU.read();
COMPASS_TYPE yaw = myIMU.getBearing();
COMPASS_TYPE roll = myIMU.getRoll();
COMPASS_TYPE pitch = myIMU.getPitch();
cout << "Yaw=" << yaw << " Roll=" << roll << " Pitch=" << pitch;

 

 

Valid XHTML 1.0 Transitional