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

getY

Returns the Y axis acceleration in mG (1/1000ths of the gravitational constant) from the last read().
Syntax
Accelerometer. getY()
Where Accelerometer is the name you have given to the device in Project Designer.
Parameters
None
Returns
ACCEL_TYPE
Example
Assuming you have called the sensor 'myAccel' in Project Designer you can dump the value to the standard output device as follows:
myAccel.read();
ACCEL_TYPE x = myAccel.getX();
ACCEL_TYPE y = myAccel.getY();
ACCEL_TYPE z = myAccel.getZ();
cout << "X=" << x << " Y=" << y << " Z=" << z;

 

 

Valid XHTML 1.0 Transitional