Bubble level doesn't produce accurate results

In the attached project, there are three cases: a vertical bubble level, a horizontal bubble level, and a center bubble level for horizontal adjustment and set xy values to be zero if bubble in centre

I've programmed the application, but it doesn't produce accurate results !! . How can I force the center bubble to stay within the circle's boundaries?

bubble_level(2).aia (420.1 KB)

You probably need to calibrate your device, and ensure you have a flat, level surface to test on.

I tried a similar app on the store and it gives correct results on the same phone.

I note in your example that the bubbles all "go the wrong way" - should go up when you tilt up.

Your maths were all wrong. I also set your three "bubbles" to origin at center 0.5/0.5

This seems to behave

bubble_level1.aia (419.9 KB)

1 Like


Samsung A13 on my desk Ahmed's app seems to be congruent with real spirit level using Tim's aia (modified) . :smiley: Thanks. Yes, my desktop is not perfectly flat (but my table say is flat)

Steve