gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Motion Sensor > DS Motion Pack requirements...

#144403 - nweaver - Thu Nov 01, 2007 5:15 pm

I'm trying to build the sample app using the slot 2 DSMotion Pack

(I can't use the slot 1, as I'll need access to the storage on the cartridge)

I currently have version 19 of Devkit ARM. Does it require version 20 or 21? Or some other library file?

Or is it simply not fully supported yet (time constraints on the developer and all that)

The reference code does not run out of the box with the slot 2 Motion Pack either.

Thanks.

#144405 - nweaver - Thu Nov 01, 2007 5:51 pm

OK, update to DevkitARM 21, change the reference slightly, and its all happy...

Two questions: Is there no longer a way to check for pack presence? Or does the return value of the new init function say something useful?

The accelerometers seem a little noisy. How long a sample length do people normally do to flatten out the noise?

Much thanks.

#144685 - KeithE - Mon Nov 05, 2007 7:13 pm

motion_init() returns 1 if it detects a motion sensor, and it returns 0 if it does not detect a motion sensor.

Averaging 3-5 samples should be good for most applications. Average any more and you start to get some noticeable delay.

Some of the noise comes from the sensor itself, but most if it is actually environmental vibration that the sensor is picking up.

#144688 - nweaver - Mon Nov 05, 2007 7:46 pm

Thanks...

For the gyro, actually, I seem to need to average a couple of seconds worth at 50ms sampling to get something that will hold reasonably straight, and I still see a fair amount of drift.

OTOH, I'm doing stuff that isn't simple "am I moving" but some more sophisticated inertial reference stuff, so that a low cost solid state gyro is a bit noisy is not a suprise.