Accelerometer as a compass??

Hi guys! I have laying arround an analog accelerometer, a pretty decent and accurate one.
What i would like to do is to mke it record the rotation from a setpoint.
So let's say in setup I get teh setpoint to be north. So, north would be the 0 position.
Then i rotate it to south, it should give me a value of +/- 180 degrees cause i've turned it 180 degrees, in the oposite direction. :o
I also have a tilt sensor from sparkfun: SparkFun Tilt-a-Whirl Breakout - RPI-1031 - SEN-12011 - SparkFun Electronics if will help me, please let me know!
Thanks a lot guys!

ciolouise222:
So let's say in setup I get teh setpoint to be north.

That will only be true if the device is pointing North when you start it up.

The beauty of a compass is that it "knows" where North is.

...R

Robin2:
That will only be true if the device is pointing North when you start it up.

The beauty of a compass is that it "knows" where North is.

...R

Let me ask the quastion in an other way.
How do i get the yaw?

Use a compass to get the yaw.

Accelerometers cannot measure rotation.

The coolest sensor I've found so for determining heading is the BNO055. This thing has an accelerometer, gyro and magnetometer all in one device and it takes care of the sensor fusion internally.

I was glad to see jremington also liked the sensor.

jremington:
Use a compass to get the yaw.

Accelerometers cannot measure rotation.

I'll add:

An accelerometer can not measure rotation in YAW. It can measure rotation in pitch and roll (as long as you're not also accelerating).

Look what DigiKey just emailel me:
Magnetic compass