adjustable digital spirit level

Your other posts on the forum suggest that you've already got some code.
Why not post it here?