Author Topic: Wii Nunchuck Connector  (Read 6310 times)

Daleeburg

  • Newbie
  • *
  • Posts: 5
Wii Nunchuck Connector
« on: January 26, 2013, 10:29:45 pm »
Just throwing this out here since I saw it in the latest "Make":  I think it is possible to use the digispark to hook a Wii Nunchuck to a PC.  It seems as though pins 2 and 5 could be connected up the nunchuck using this diagram which I stole from this instructable.  My only concern may be the library size.

This may be useful for either a computer or a Raspberry Pi.

Thoughts, comments suggestions?

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Wii Nunchuck Connector
« Reply #1 on: January 27, 2013, 12:40:24 am »
I imagine if the library is too big it could be pared down quite a bit - I2C is easy with the Digispark by using TinyWireM in place of Wire - and doesn't take much code to implement actual communication, so if the library is large it is because of any processing it does with the data.


I have a Wii - I'll have to give this a try when I get a chance - definitely should be an easy USB to Nunchuck converter, especially with the joystick library already available for Digispark!

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Wii Nunchuck Connector
« Reply #2 on: January 27, 2013, 12:46:09 am »
I should add the connections would be data to SDA (P0) and clock to SCK (P2), 5v to 5v and gnd to gnd


It also might required a pullup (4.7k works well) between data and 5v, and clock and 5v - but this may be built into the nunchuck.

Mark

  • Full Member
  • ***
  • Posts: 196
Re: Wii Nunchuck Connector
« Reply #3 on: February 07, 2013, 07:13:45 pm »
Nunchuk Wii is 3v3.
Ive used one on a small bot, and it works with either wired or cordless versions.
There's very little processing required to the data, just be careful some sketch's are incorrect in which bits they shift.

The attached sketch compiles at 6088 bytes, so it needs some pruning, but it should give a head start.

mark