I have noticed in printing out the data from the MP the first 6 bytes are the gyro data in this format xx yy zz XX YY ZZ yy being the lower 8 bits and YY being the upper 8 bits. The Z gyro at rest is Byte 5 = 7A and byte 6 = 7E. pretty normal so far.
Y bytes at rest are byte 3 = 83 and byte 2 = a value that wont settle down.
Then X bytes are byte = 1 is again a varing amout that wont settle down and byte 0 = 0 all the time at rest or when moving the gyro.
Looks like bytes 0,1, and 2 are messed up.
I am using my program 06-23-09-i2cDATAmp4LINES0-4 - Archive [noparse][[/noparse]Date 2009.06.23 Time 23.40].zip to retrieve the raw data. It appears to work...with the above results. Not what expected.
What does anyone else think ?
Earl
Ahhh....I think I see it. The gyros are 'twitchy' at rest because the 'rate' is so high. (2000/sec)
What we need is to find a way to change the 'rate' of the gyros.
Just a matter of time.......
Earl: Yeah, they're just really sensitive. Also note that the lowest two bits of XX YY ZZ never change and should be shifted off (you should have 6 bits each from XXYYZZ and all 8 bits of xxyyzz). You can see it in my code I posted. I did a pretty long data collect of it sitting still, and I noted the standard deviation to be between 3 and 7 (depending on the axis), and the mean to be near 0x8000, but each axis having a small offset.
I am looking into integrating a Kalman filter to the NC/MP combo. Should be cool...
In the Objects there is a 5DOF with a Kalman filter. It uses an A/D converter that we don't need and we have one more axis to boot.
Heh, thanks for pointing out that the MP is supposed to pass the data through if used with the original init. Mine didn't work, so I assumed Nintendo just did something stupid and was going to require players to remove the MP to play old games, but it actually ended up being a broken wire on my FFC between the MP PCB and the connector on the bottom. I probably flexed it too far when I opened it the first time. I cut the FFC back and resoldered it and it works great now [noparse]:)[/noparse] . Now if I get some spare time, I can see about making the MP and nunchuck work at the same time (I'm glad I didn't spend much time trying to do that before or I would have wasted a lot of time :P ).
Nope... it sounds like tons of fun, but I'm in DC... so it'd be a pretty long haul to get there. I'll be making a trip to CA in a couple weeks for an arcade/pinball convention though... but that's in San Jose, and a couple weeks too late :P. I'm thinking about making it to the one in Ohio, but I'm not sure if it'll work into my schedule. My grandma lives a couple hours east of that one though, so I could stay and visit there and head to the expo early that morning.
Hey guys, just wanted to drop in, introduce myself, and let you know that Im working on the same project for the arduino. I got the motion plus up and running on the arduino platform but have run into the same problem with the nunchuck. Unfortunately I dont have either my nunchuck or wiimote to test with, so Im stuck for a little while. Ill be lurking here, wiibrew, cwiid, and google for any info that helps. (I cant read much basic, but ill try to keep from asking dumb questions-i started out on basic stamp btw) Also @old man earl-are you earl on diydrones, just wondering?
Cool... definitely post here if you make any progress. I haven't worked on it in the last week since I've gotten lots of cool new toys, so I've been working with them, and I don't have an immediate need for both the MP and Nunchuck (and someone will probably figure it out before I need it). I'm not too familiar with the Arduino, but on the prop we don't have dedicated i2c hardware, so we can just make two i2c busses out of the I/O pins and not run the nunchuck through the MP if we need both. I don't have any of the MP Wii games that use the nunchuck (and neither does my closest Blockbuster) or I'd log it w/ my logic analyzer and see what commands it uses though.
I just wanted to post that I updated the MotionPlus and Classic Controller objects in the obex. The Classic Controller object is just a bugfix, fixing a typo which caused the R stick X axis to be wrong.
The MotionPlus is a lot different. I searched a little and couldn't find anywhere that anyone else had already gotten the extensions to work, so I spent a few minutes to get some logs of Wii Sports Resort talking to the MotionPlus and Nunchuck on my logic analyzer. After analyzing the logs, I decided to try a few things, and noticed that writing a 5 during initialization rather than a 4 interleaves nunchuck data on every other read, removing the LSBit of each accelerometer axis. I also noticed writing a 7 makes it work with a Classic Controller, removing the LSBit of the L joystick axis. So, this object combines the MotionPlus, Nunchuck, and Classic Controller objects so you can use the MotionPlus with the extensions with the same functionality as the standalone objects. Just initialize it with the correct mode (MP_ONLY, MP_NUN, MP_CLASSIC).
Anyway, let me know if you have any questions or comments, and check out the comments in the code for more details. Also, let me know if you see any problems... I did this very quickly with a lot of copy/pasting of code from my other objects, so it's likely that there are bugs, but I wanted to post it before I leave for the weekend.
hello, im trying to use a wii classic controller with the project board. i have the wire to the controller cut open and im attempting to wire it in a way that works. i have a resistor on the sda and scl is connected like it should be. However when i attach both power and ground to the board it shuts off, so i also have a resistor between the 3.3v wire and the bored. the code runs only when i dont attach the ground, only it shows constant 31, 31,30,30,31,31,0000 and a blue light labeled 'tx' goes on. what does this mean and how can i get this to work? also is there anything i should be doing with the many copper wires from the cable
Comments
Y bytes at rest are byte 3 = 83 and byte 2 = a value that wont settle down.
Then X bytes are byte = 1 is again a varing amout that wont settle down and byte 0 = 0 all the time at rest or when moving the gyro.
Looks like bytes 0,1, and 2 are messed up.
I am using my program 06-23-09-i2cDATAmp4LINES0-4 - Archive [noparse][[/noparse]Date 2009.06.23 Time 23.40].zip to retrieve the raw data. It appears to work...with the above results. Not what expected.
What does anyone else think ?
Earl
What we need is to find a way to change the 'rate' of the gyros.
Just a matter of time.......
value = (7*value + new_value)/8
where value is a running average and new_value is the new sensor reading. You can vary the 7 and 8 e.g. 3 and 4 gives less filtering, etc.
I just level "Dollar General" and noticed they have Wii compatible
(N64 style) controllers for $10.00.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
DogP
In the Objects there is a 5DOF with a Kalman filter. It uses an A/D converter that we don't need and we have one more axis to boot.
DogP
You going to the Expo Sat and Sun in Rocklin CA ?
DogP
See ya all soon........
Earl
DogP
I just wanted to post that I updated the MotionPlus and Classic Controller objects in the obex. The Classic Controller object is just a bugfix, fixing a typo which caused the R stick X axis to be wrong.
The MotionPlus is a lot different. I searched a little and couldn't find anywhere that anyone else had already gotten the extensions to work, so I spent a few minutes to get some logs of Wii Sports Resort talking to the MotionPlus and Nunchuck on my logic analyzer. After analyzing the logs, I decided to try a few things, and noticed that writing a 5 during initialization rather than a 4 interleaves nunchuck data on every other read, removing the LSBit of each accelerometer axis. I also noticed writing a 7 makes it work with a Classic Controller, removing the LSBit of the L joystick axis. So, this object combines the MotionPlus, Nunchuck, and Classic Controller objects so you can use the MotionPlus with the extensions with the same functionality as the standalone objects. Just initialize it with the correct mode (MP_ONLY, MP_NUN, MP_CLASSIC).
Anyway, let me know if you have any questions or comments, and check out the comments in the code for more details. Also, let me know if you see any problems... I did this very quickly with a lot of copy/pasting of code from my other objects, so it's likely that there are bugs, but I wanted to post it before I leave for the weekend.
DogP
BTW, this is a good way to save yourself cutting off the connector next time.
http://propellerpowered.us/index.php?route=product/product&product_id=212
Jeff