Spirit levels are ubiquitous in various fields of design and they serve an essential purpose of indicating the levelness of the surface in question. Traditional techniques comprise of an air bubble trapped in a liquid which balances itself in the center when held level; however, it requires a good visual check to determine the readings. If you try to reason out what determines the levelness of a surface, you will soon come to realize that it is the 2D orientation that determines the level, i.e. height is irrelevant, since a crooked surface will still remain crooked even if you raise it up by 1 or 100m. (Assuming of course you raise the entire surface equally). So in order to build a digital prototype we need to sense the orientation of the surface in question, lucky for us we already have a sensor available: the humble accelerometer.