Accelerometer initialization

My partner and I have recently started using the accelerometer. After doing some research, one of the suggestions is to use the z axis (or whatever axis is under the influence of gravity) to determine how many ticks are equal to 1g. However, when the sensor initiates the axis that starts under the influence of gravity is set to zero, so that it automatically adjusts for gravity. Is there a specific setting that controls this? All of the online documentation that I’ve read about the accelerometer says that this shouldn’t happen. What is different about our sensor/settings, and how can we change this?

You could just initialize to zero and then rotate the accelerometer so the vector has it unaffected by gravity. Turn the robot on its side and take the difference.

Note that RobotC (if you are infact using RobotC) tries to do all the heavy lifting for your in this regard and initialize the sensor, account for drift using a few constants and convert all of this so its super easy for you to use all of this information in your programs. If you instead want to get a little more nitty gritty - you could have a look at the includes files for RobotC and have a poke around getting the actual raw values (i don’t have a copy of RobotC on hand).