![]() |
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. |
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. |
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) |
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.
|
Re: Accelerometers
Quote:
But depends how the system use it :p |
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
|
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. |
Re: Accelerometers
Quote:
Thanks. |
Re: Accelerometers
Quote:
|
Re: Accelerometers
Ah no worries, just looked in the patch. Take a look at the following file: /drivers/i2c/chips/lis302dl.c
|
Re: Accelerometers
Quote:
|
Re: Accelerometers
Quote:
|
Re: Accelerometers
So the answer is yes, you can alter the rate from the looks of it. See lis302dl_set_rate() and likewise the scaling with lis302dl_set_scale()
|
Re: Accelerometers
Quote:
|
Re: Accelerometers
Quote:
|
Re: Accelerometers
I just grabbed the patch from the repo: http://repository.maemo.org/pool/fre...02+0m5.diff.gz
|
Re: Accelerometers
Quote:
|
Re: Accelerometers
Quote:
I'm happy now :D |
Re: Accelerometers
Quote:
|
Re: Accelerometers
Quote:
if not, it would be nice if there was perhaps a small redirection app which could allow people to test using as you say a tiltstick, or using a bluetooth connected wiimote. Perhaps the library version does this already and will accept input from any accel unit, maybe someone else will know. |
Re: Accelerometers
Quote:
|
Re: Accelerometers
The enigma game is now in fremantle extras-devel and includes accelerometer support.
|
Re: Accelerometers
Quote:
My big son asked me whether that was a real ball. |
Re: Accelerometers
Quote:
|
Re: Accelerometers
Quote:
Accelerometer really needs some documentation. The wiki page doesn't count as documentation atm :) |
Re: Accelerometers
Indeed, I've got a great idea for a simple app using the accelerometers; but am unsure whether it's best to poll the sysfs interface directly, or some other mechanism.
|
Re: Accelerometers
Please file a bug for the lack of official documentation on how to use the accelerometers. I put together the wiki page as a temporary solution.
|
Re: Accelerometers
Quote:
Feel free to add more specific requests on the documentation that should be provided. |
Re: Accelerometers
Quote:
|
Re: Accelerometers
Quote:
But i agree that some generic tilt sensor solution is required which may then again include support for the tiltstick. |
Re: Accelerometers
Apropos accm, I undestand this is a hardcore question but... will we have access to the inertial wakeup feature of the chip ? (this could be used to detect being picked up/flipping pages/etc without polling like crazy).
|
Re: Accelerometers
Quote:
|
Re: Accelerometers
There is a new version of NumptyPhysics in Fremantle extras-devel. The game now starts with a new but provisional screen: "Accelerometers test".
Sadly the test fails. The objects in that screen and anthing else you draw follows the same gravity falling down the display... no matter in what position you have the device. Maybe someone can give a hand to Tim Edmonds? |
Re: Accelerometers
I uploaded madbomber 0.2.5-3maemo5 to extras-devel, it has accelerometer based control now. Any feedback (does it work, direction ok, general feel) would be welcome so I could decide what do with it.
|
Re: Accelerometers
MadBomer doesn't seem to respond to accelerometers. The keys do work.
|
Re: Accelerometers
Quote:
Code:
ln -s /sys/class/i2c-adapter/i2c-3/3-001d/coord /tmp/coord |
Re: Accelerometers
Bringing this back from the dead...
I looked at sandcastle and there is the DBusGProxy callback. Ok, what amound of motion does it take to trigger such a callback? Is there some documentation on the nature of the dbus accelerometer functionality? |
Re: Accelerometers
hi,
i am also interested to know how one can access the accelerometer on the N900, especially if it is possible to do so via Python. how about other sensors? or radio signal/base station/battery etc.? thank you.. wahlau. |
Re: Accelerometers
See http://wiki.maemo.org/Accelerometers, it even has a python example.
|
Re: Accelerometers
thanks. that answers my answer pretty well!
i wonder if there will be Sensor API-like on the S60 Platform interfaces on N900. that would make many things simpler... :) |
All times are GMT. The time now is 15:49. |
vBulletin® Version 3.8.8