@michinyon: i want to make 3 axis gimbal for my project. I use 3 servo motors and this Multiwii board:https://www.hobbyking.com/hobbyking/store/__27033__MultiWii_328P_Flight_Controller_w_FTDI_DSM2_Port.html

Those board is Arduino based. There are 4 sensors, but i just use BMA180 accelerometer and ITG3205 Gyroscope for my 3 axis gimbal. The Multiwii board is coming with the program, but the gimbal program is only for 2 Axis. Besides that, I want to make a program by my self from the beginning.

So i learn all from beginning, including reading data from BMA180..

can you help me in making 3 axis gimbal? is there anything that can be a reference for me?

acceleration can occur in two directions. So for three axes, there are six directions.It can be accelerating forwards or backward, up or down, left or right. Thats six.Thats why you get three numbers which may be positive or negative.

It's unclear why you only want positive numbers. If the sensor tells you -2000, what do you want ? 0 or +2000 ?

If you want the total magnitude of the acceleration, you would calculate the length of the apparent acceleration vector,which would be something like