Accel digital spirit-level wanted

Joel Newkirk freerunner at
Sat Nov 29 03:40:04 CET 2008

On Fri, 28 Nov 2008 20:17:17 -0500, Joel Newkirk <freerunner at>
> On Fri, 28 Nov 2008 03:28:32 -0800 (PST), bytestore <bytestore at>
> wrote:
>> :) Many thanks, I did not know
>> Stroller-2 wrote:
>>> On 28 Nov 2008, at 07:02, bytestore wrote:
>>>> anybody, write programm digital "building" level
>>> The English word for this is a digital "spirit level".
>>> HTH,
>>> Stroller.
> I explored this a couple months ago.  My conclusion was that we didn't
> enough precision and stability from the accelerometers for this purpose,
> without smoothing computations I didn't explore.  My testing indicated,
> for
> example, that if the FR is laying on a 4-foot long shelf, you can raise
> lower one end of that shelf by about an inch before being certain via
> /dev/input/event3 that you've in fact tilted the FR that direction.  At
> about a half-inch it's clear that the values are changing, but the
> constant
> low-level fluctuations drown out your certainty, short of quite a bit
> work (computationally, smoothing and comparing) than I was interested in
> putting into the project at the time.
> j

I tarballed up my work-in-progress. It's a short python program and a
couple image files, at - extract,
'python' to run, tap screen to exit. (depends on python-pygame) 
After starting up it calibrates by averaging the first 17 samples it takes,
calls that 'level' and proceeds to show deviation from that.  Obviously
this is useless in the actual use of a spirit level / bubble level, it's
set that way for testing. 


More information about the community mailing list