How to calibrate Robogaia accelerometer/gyro shield

Earth's gravity is pulling down with a force of 1G which means one gravity . This is very specific to Earth and the Moon has 1/6 of gravity of earth.
The accelerometer sensors usually output an analog , PWM or digital signal. Usually the maximum output is proportional to the VCC voltage.
In order to calibrate the accelerometer we have to know the output of the accelerometer for the axes that is perpendicular to the Earth surface. So for example for x axes the axes has to point up.
The Earth acts on one of the chip's axes with a force of one G . By Taking note of the output value we determined the value at 1 G.
If we would know the output value when the sensor output.
The chip outputs a 16 bit signed value that is from -32768 to 32767.
For accelerometers means from - 4G to +4G and for 1 G it will be 8191 counts.
The accelerometer sensors usually output an analog , PWM or digital signal. Usually the maximum output is proportional to the VCC voltage.
In order to calibrate the accelerometer we have to know the output of the accelerometer for the axes that is perpendicular to the Earth surface. So for example for x axes the axes has to point up.
The Earth acts on one of the chip's axes with a force of one G . By Taking note of the output value we determined the value at 1 G.
If we would know the output value when the sensor output.
The chip outputs a 16 bit signed value that is from -32768 to 32767.
For accelerometers means from - 4G to +4G and for 1 G it will be 8191 counts.
Code Example (Also available here)
In the code example the accelerometers are setup to output up to +/- 4 g.
The first code example outputs the raw data from the sensors and the second example outputs
the values in international units.
The first code example outputs the raw data from the sensors and the second example outputs
the values in international units.

accelerometer_gyro_shield_test_v1.0_.zip | |
File Size: | 3 kb |
File Type: | zip |

accelerometer_gyro_shield_test_international_units.zip | |
File Size: | 3 kb |
File Type: | zip |
X Axis Accelerometer

In this orientation the X axis should output
1G or about 8191 counts (configured with 4G output)
The other 2 axes should output values closed to 0
1G or about 8191 counts (configured with 4G output)
The other 2 axes should output values closed to 0
Y Axis Accelerometer

In this orientation the Y axis should output
1G or about 8191 counts (configured with 4G output)
The other 2 axes should output values closed to 0
1G or about 8191 counts (configured with 4G output)
The other 2 axes should output values closed to 0
Z Axis Accelerometer

In this orientation the Z axis should output
1G or about 8191 counts (configured with 4G output)
The other 2 axes should output values closed to 0
1G or about 8191 counts (configured with 4G output)
The other 2 axes should output values closed to 0
Gyros Calibration
The gyros are setup in the code example for maximum Gyro scale +/-2000º/s