PID self balancing robot?

I'm trying to make a self balancing robot using a three axis accelerometer and a one axis gyro.

Accelerometer:

Gyro:

I want the robot to be able to stay upright while powered on with a setpoint of 0.

My question is how to implement these two sensors together to output the (MV) manipulated variable? I've had a look at just about every website on the internet with no suffice.

ANY help is appreciated, Thanks in advance.

Any ideas?

Is this different from your other post?
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1271624043/6#6

Can you describe what you have done so far?

For example, have you tried fixing the axle of the robot in one position, and only using the gyro, so it behaves like an inverted pendulum?

My question is how to implement these two sensors together to output the (MV) manipulated variable?

Bump