maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Accelerometers (https://talk.maemo.org/showthread.php?t=29091)

VDVsx 2009-05-21 11:13

Accelerometers
 
Hello,

yesterday appeared a page on the maemo wiki about the accelerometers features in fremantle. In this page is suggested a example application, and a deb file (compiled to arm) is provided.

How should we use it ? :p or it's just for internal use/future code example ?

Since I'm very interested in the accelerometer features of fremantle, I have a couple of harmless questions (if this information can be disclosed now).

Is possible to set/get the sample rate and threshold via sysfs ?

The accelerometers d-bus code is OSS or will be ?

Thanks.

lcuk 2009-05-21 11:24

Re: Accelerometers
 
interesting

i wonder if we could hack something together using the wiimote drivers to give similar results.

tape wiimote to bottom of 810 and see if it works, or plugin one of the mini usb ones ive seen knocking about.
i doubt we could replicate the dbus part, but the sysfs portion looks feasible for a fake driver to supply.

yerga 2009-05-21 11:43

Re: Accelerometers
 
I have compiled the app for X86 to test it in the SDK, but it fails with a nice core dump:
Code:

ERROR:sand.c:285:main: assertion failed: (dbus_proxy)
/usr/bin/run-standalone.sh: line 11: 23643 Aborted                (core dumped) "$@"


lardman 2009-05-21 12:39

Re: Accelerometers
 
Might be best to look at the kernel code and see what the driver does (assuming we have the relevant bit), apparently the scaling, etc., to produce a value in milli-gs is done in there.

VDVsx 2009-05-21 13:15

Re: Accelerometers
 
Quote:

Originally Posted by lardman (Post 288996)
Might be best to look at the kernel code and see what the driver does (assuming we have the relevant bit), apparently the scaling, etc., to produce a value in milli-gs is done in there.

Yeah, the driver is there: /kernel-2.6.28/drivers/hwmon/lis3lv02d.c
But depends how the system use it :p

Lord Raiden 2009-05-21 13:38

Re: Accelerometers
 
Ya know, if the next NIT has an accelerometer in it, I'm so gonna be stoked. That in itself has so many uses that I can't even name them all. :D

qgil 2009-05-21 13:49

Re: Accelerometers
 
Hi, yes I published that page yesterday but then I went for other things and forgot to link it somewhere.

Basically is the best I could get to answer a question that was coming from the NumptyPhysics developer and others. Hopefully a better interface and documentation will come, but in the meantime you have the basics there.

About the little app, please contact marnanel directly. I'm sure he is willing to share his own findings but I don't expect him to be aware of this thread here. I have seen the app working but that's all I know about it.

VDVsx 2009-05-21 13:56

Re: Accelerometers
 
Quote:

Originally Posted by qgil (Post 289017)
I have seen the app working but that's all I know about it.

In a Fremantle prototype device right ?

Thanks.

lardman 2009-05-21 13:56

Re: Accelerometers
 
Quote:

But depends how the system use it
I was assuming the sysfs entry code would also be present. I can't look myself atm as I'm running on WinXP (can't apply the diff easily), but will have a look through later on.

lardman 2009-05-21 14:01

Re: Accelerometers
 
Ah no worries, just looked in the patch. Take a look at the following file: /drivers/i2c/chips/lis302dl.c


All times are GMT. The time now is 16:47.

vBulletin® Version 3.8.8