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

getAccelY

Returns the Y axis acceleration in mG (1/1000ths of the gravitational constant) from the last read().
Syntax
Imu. getAccelY()
Where Imu is the name you have given to the device in Project Designer.
Parameters
None
Returns
ACCEL_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();
ACCEL_TYPE x = myIMU.getX();
ACCEL_TYPE y = myIMU.getY();
ACCEL_TYPE z = myIMU.getZ();
cout << "X=" << x << " Y=" << y << " Z=" << z;

 

 

Valid XHTML 1.0 Transitional