Go Down

Topic: Wii Nunchuck Troubleshooting (Read 3 times) previous topic - next topic

markB

Guys
I have been using both a normal wired genuine Nunchuk and a wireless version from DealExtreme, and my initialisation and read code values are different to yours.
Maybe these might help.


Code: [Select]
// initiate Wii Nunchuk
      //Serial.print ("Initialising Wii Nunchuk ........");
      Wire.beginTransmission(0x52); //0xA4
      Wire.send(0xF0);
      Wire.send(0x55);
      Wire.endTransmission();
      //Serial.print (" OK done");
      //Serial.print ("\r\n");
      delay (100);
     
      //Serial.print ("Set reading address at 0xFA .......");
      Wire.beginTransmission(0x52); //0xA4
      Wire.send(0xFA);
      Wire.endTransmission();


Mark

SAIcon

MarkB, that fixed the problem. I am now able to see a change in data. Thanks so much!!! Thanks to everyone who has offered suggestions and advice. Mark, May I ask how did you come across this initialization code?

markB

@SAIcon
I was following the thread for a Balancing Robot, which used the Nunchuk (NC) and Motion Plus (MP).
The codes are modified because the MP receives the data, manipulates it and the controller (Arduino or Wii) then gets it from the MP.

I recall that in amongst all the thread there was a reference to the Wiki http://wiibrew.org/wiki/Wiimote/Extension_Controllers about Wii, and its in there tied up with the eprom address to read. (Looking at the codes .. it seems its the same as if a MP is plugged in, so maybe its intelligent enough)


Anyway glad it's resolved.
I've got some code for a Nunchuk controlled BOT using the joystick if you want.

Mark

SAIcon

@MarkB, Gotcha and sure I would love to see the code for the BOT

markB


Go Up