0

Motionplus Clock
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Motionplus Clock

by priya90 on Tue Nov 16, 2010 12:12 am

Hello ,

I am trying to synchronize the Wiimote and an electronic compass to start sensing values at the same time. I was wondering, is there a way to get the internal clock values of the Motionplus? Can I control when it starts to sense and when it stops?

Thanks!
priya90
 
Posts: 2
Joined: Mon Nov 15, 2010 4:57 am

Re: Motionplus Clock

by chatham on Tue Nov 16, 2010 1:11 pm

The WM+ is an I2C Slave, so if you're interfacing with it directly, you get to tell it when to give you new data.

In terms of how often the WM+ refreshes its registers, this is what I could find:
In this mode, MotionPlus data and modified Nunchuck data are interleaved, you can retrieve one set of data every 3ms (one wm+, one nunchuck, one wm+ and so on). First 6 byte are the motion plus, send a byte 0, wait some time that WM+ retrieve and overwrite its buffer, and now read other 6 byte that are the nunchuck data. If you don't wait some time (3ms between every request), WM+ give incorrect data, mixing byte with nunchuck. The data format for the Motion Plus does not change, but the data format of the nunchuck is different than the normal way:


That quote comes from here:
http://wiibrew.org/wiki/Wiimote/Extension_Controllers#Wii_Motion_Plus
which is where I've found to be the best resource for Wiimote extension technical information.
OpenChord.org - Open Source kits to let you play Guitar Hero with a real guitar, or build your own Wii/PS3/USB controllers.

chatham
 
Posts: 144
Joined: Thu Feb 04, 2010 2:30 am

Re: Motionplus Clock

by tinsmith on Fri Nov 19, 2010 2:23 am

It quite possibly supports a 3ms sampling interval if the Nunchuck isn't connected then.

There also wouldn't be a stop/start as it's not integrated over a period. It will give you whatever the current output is from the MEMS rotation sensor, e.g. the deflection of the angular comb drive or whatever is in them (I think it's actually using a method that looks for perturbations in the vibration of a proof mass). It's then up to you to run that through a median smoothing algorithm or whatever (like with most sensors).
tinsmith
 
Posts: 62
Joined: Thu Nov 18, 2010 9:18 pm

Please be positive and constructive with your questions and comments.