Measure horizontal axis

Hi,

I am working on a setup that I can use in my camper-van to measure if it is set up horizontally.
I would like to have four values returned from the program: left front, right front, left rear, right rear. Then I know which side/corner I have to adjust.

I am trying it with an 3-Axis HMC5883L sensor but I cannot make heads or tails from the values it returns.

Anybody with experience or ideas?

Regards,
Jeroen

Bubble level.

3-Axis HMC5883L sensor

This is an electronic compass chip, which some people use to determine the direction of North.

Accelerometers can be used as tilt meters, but a bubble level is a lot easier.

Hi, thx for the replys.

I know the HMC5883 is a compass, but as it has 3 axis I assumed I would be able to get also pitch and roll.

I did some searching for a "bubble level sensor" but had little luck, only found results based on accelerometer setup... So now I ordered a GY-80 and a seperate ADXL345 so I can do some experimenting.

THX!!