Interfacing Arduino with wiimote (and later the nunchuck)
I was toying with the idea of interfacing wiimote to my arduino as my replacement for accelerometer and gyroscope which comes in this package the
IMU Combo Board - 3 Degrees of Freedom - ADXL203/ADXRS614http://www.sparkfun.com/commerce/product_info.php?products_id=9249
which cost USD$124 which is equivalent to SGD$162.44.
FYI, my wiimote cost me sgd$69 (left over from last year FYP project) and nunchuck sgd$25 (which I got from the shop at clementi city vibe where my student yenyu working part time).
Shall not elaborate about the wiimote and nunchuck...There are plenty of resources in the Internet.
I found out that the pin outs for the wii expansion port (WEP) from the Internet, thanks to the people that are willing to share the data! The drawing are for interfacing the IEEE1394 to the WEP.
Connect pin1 of WEP to Aref on arduino
pin2 of WEP to A5
pin5 to A4
pin6 to ground
I also found out that, it is not necessary to buy a nunchuck, cut out the connector part and used it with the wiimote. That, will render the nunchuck useless (to the Wii ofcourse, later you guys will find out more about my experiment with wiimote and why I have to use the nunchuck instead...........)
The replacement is a IEEE1394 male to male cable for sgd$7 from simlim square.
The pin out on the IEEE1394 and the WEP are carefully map out....
This is how it is going to look like, when they are connected...
Below are the code for sending and receiving data between arduino and pc. Similar code can be found at wiimeadows too! thanks to them for discovering the pattern of data send and receive out of the wiimote.
below are the ASCII art for the data flow of the devices that are hooked up together.
Some way, some how, when I open my hyperterminal to observe the data output, I only receive my debug message which is "serial init finished". This means my serial connection of 119200 is setup correctly, but no generated data is observed. No subsequent data is collected both from the arduino through the wiimote to the pc (need to use 3rd party wiimote driver, such as wiimote library on the windows OS), nor the pc through the wiimote to arduino (through hyper terminal).
Used my multimeter to check the VCC and the gnd pin of IEEE1394 pin out, all seems to be correct. Just that no data is observed from the transferring between the devices.
Rewire the IEEE1394 again, with more meticulous effort put in... the result is still the same............................................
Fustrated, because if I can't get the accelerometer readings from the wiimote to arduino, my hypotheses of using it as my sensor would be false!!!!!!
I was contemplating to cut my nunchuck to retrieve the WEP PROPRIETARY connector..........because, I could still use the nunchuck on the wii (As if I got one, hahahah). If In the end, I decided to mutilate the nunchuck. Plug in the connector to the wiimote and the exposed end to the arduino.... No eureka moment.......... the data output is the same as the IEEE1394 cable........Very fustrated................................because of my hypotheses would failed..........................
But, which part went wrong?????? I am still finding the cause of it..........There are success stories on the Internet that used the similar setup.......
Before the last straw to be thrown, I tried to hooked up the nunchuck to the arduino instead.
with the code attached below
Atlas.... some readings from the accelerometer on the hyperterminal...data from the nunchuck.......