Electronic bubble for tilt measurement