webOS Nation Forums > Homebrew > webOS homebrew apps > Carpenter's Level
1 2 3 
Member: kmax12
at: 11:07 PM 07/24/2009
This is a spirit level or carpenter's level that uses the accelerometer to determine the orientation. I don't find it to be very accurate, but its a fun tool to have. In the code I adjust for how the Pre doesn't sit quite straight. In my Pre this allows it to just about zero out accurately. From my testing it is accurate withing +/-.2 degrees.

As you will see, the graphics are atrocious. This app can't reach its potential without killer graphics. I, unfortunately, can't make them so it is up to you guys.

Usage info
Well, that is it download below and leave feedback

Download the latest version from the Homebrew Apps Gallery: Carpenter's Level
Attached: carpenterslevel_2009-24-07_220609.jpg (24.7 KB) 
carpenterslevel_0.1.0_all.ipk (26.1 KB) 
Reply
Member: drummer12
at: 11:14 PM 07/24/2009
Going to try this out...was waiting for an app like this to come along! Thanks!
Reply
Member: daba
at: 11:16 PM 07/24/2009
kmax12
Love ur apps keep up the good work. Reading and studying to someday release my own apps. Thanks
Reply
Member: drummer12
at: 11:16 PM 07/24/2009
Well, works as documented...wish it was faster...oh well. Works in a pinch!
Reply
Member: dcoaster
at: 11:23 PM 07/24/2009
I guess this is the only time I would wish the Pre had some flat edges!
Reply
Member: sweet greggo
at: 11:29 PM 07/24/2009
cool! of course with all the curves, leveling is difficult with the Pre. still neat, though.

Looks like some code optimizing is needed, the updates are very slow. I'm sure the hardware on the Pre is robust enough to smooth out the movement.

Keep up the good work!
Reply
Member: jhoff80
at: 11:34 PM 07/24/2009
Originally Posted by sweet greggo:
cool! of course with all the curves, leveling is difficult with the Pre. still neat, though.

Looks like some code optimizing is needed, the updates are very slow. I'm sure the hardware on the Pre is robust enough to smooth out the movement.

Keep up the good work!
Part of that is limited number of updates for the accelerometer too.
Reply
Member: kmax12
at: 11:36 PM 07/24/2009
Originally Posted by sweet greggo:
cool! of course with all the curves, leveling is difficult with the Pre. still neat, though.

Looks like some code optimizing is needed, the updates are very slow. I'm sure the hardware on the Pre is robust enough to smooth out the movement.

Keep up the good work!
actually the sdk only allows getting info from the accelerometer 4 times a second, I think I read somewhere that the iphone is 20 (maybe it was 40). Unless this is changed, it is going to be jerky. However, I am gonna try to smooth the bubble movement by animating the in between frames so it at least gives the appearance of smoothness.
Reply
Member: Felipe
at: 01:05 AM 07/25/2009
hey, there is an app for that.

Reply
Member: oaponte
at: 01:57 AM 07/25/2009
great concept!!
Reply
Member: uphat
at: 02:46 AM 07/25/2009
Just the app I need to balance my pre on it side
Reply
Member: bogdanobi
at: 02:49 AM 07/25/2009
Excellent idea. You should continue working on this app.
Reply
Member: mrloserpunk
at: 02:53 AM 07/25/2009
Originally Posted by kmax12:
actually the sdk only allows getting info from the accelerometer 4 times a second, I think I read somewhere that the iphone is 20 (maybe it was 40). Unless this is changed, it is going to be jerky. However, I am gonna try to smooth the bubble movement by animating the in between frames so it at least gives the appearance of smoothness.
is that something that can be changed or is it stuck at 4 a second?
Reply
Member: JWille
at: 03:36 AM 07/25/2009
Haven't tried it yet but already got a request . I always thought it would be cool to have an adjusted zero button. That way I could use it in any orientation or to replicate different readings. Thanks! Hope you continue the app!
Reply
Member: jhoff80
at: 04:54 AM 07/25/2009
Originally Posted by mrloserpunk:
is that something that can be changed or is it stuck at 4 a second?
It's the max Palm allows at the moment, so it's stuck.
Reply
Member: clerick44
at: 05:31 AM 07/25/2009
could this be adapted to measure G-forces in a car? you know... for on-track use?
Reply
Member: boxboy
at: 06:28 AM 07/25/2009
I hope Palm increases the update refresh rate!
Reply
Member: kmax12
at: 09:41 AM 07/25/2009
Originally Posted by clerick44:
could this be adapted to measure G-forces in a car? you know... for on-track use?
there is api's on plams website for G forces so it is possible. how would this be incooperated? is it just a numerical output or are there asociated graphics?
also would you only need one axis or all 3?
Reply
Member: clerick44
at: 10:05 AM 07/25/2009
Originally Posted by kmax12:
there is api's on plams website for G forces so it is possible. how would this be incooperated? is it just a numerical output or are there asociated graphics?
also would you only need one axis or all 3?

I would imagine a simple X/Y plot marked from 3 to -3 in .2g intervals on the Y axis and, -1.2 to 1.2 in .05g increments for the X axis. Y would represent the acceleration/braking and the X would be lateral G's. There would be a dot floating around that plots with parameters at the same time and an Actual read out that would show instantaneous and max values in each of the four directions.

AND if the programming gods smiled bright on me it would have the ability to measure and/or graph speed versus time.

Am I being greedy?
Reply
Member: sweet greggo
at: 11:21 AM 07/25/2009
Originally Posted by kmax12:
actually the sdk only allows getting info from the accelerometer 4 times a second, I think I read somewhere that the iphone is 20 (maybe it was 40). Unless this is changed, it is going to be jerky. However, I am gonna try to smooth the bubble movement by animating the in between frames so it at least gives the appearance of smoothness.
Surely that will be increased. The accelerometer needs to be updated quicker not only to make apps like this more useful, but for gaming. I know Palm said this isn't a high end gaming device, but ultimately the end user will decide that.
Reply
1 2 3 
webOS Nation Forums > Homebrew > webOS homebrew apps > Carpenter's Level