Adapter for this controller

Gramps

Senior Member
20200227_081544.jpg
It seems like we saw a post about an adapter for this controller, perhaps on this forum.
It was the female half of this jack with wires so we wouldn't have to cut the cable to hack it.
A pinout would be really appreciated too.
Does anybody remember this?
Thanks, Gramps
 

hippy

Technical Support
Staff member
That would appear to be a third-party Nintendo Wii Controller Pro. From my notes -

This is looking into the socket on an extension cable -
Code:
     3V3   SDA
      :     :
.-----:-----:-----.
|   ___________   |
|  |           |  |            1 = 3V3
|  |  n  n  n  |  |  1 3 5     2 = SCL
|  |  =======  |  |            3 = N/C
|  |  u  u  u  |  |  2 4 6     4 = N/C
|  |___________|  |            5 = SDA
|                 |            6 = 0V
|  .--:-----:--.  |
`--'  :     :  `--'
      :     :
     SCL    0V
Looking into the plug on a controller lead -
Code:
     SDA   3V3
      :     :
.-----:-----:-----.
|   ___________   |
|  |  u  u  u  |  |  5 3 1     1 = 3V3
|  |           |  |            2 = SCL
|  |           |  |            3 = N/C
|  |           |  |            4 = N/C
|  |__n__n__n__|  |  6 4 2     5 = SDA
|                 |            6 = 0V
|  .--:-----:--.  |
`--'  :     :  `--'
      :     :
     0V    SCL
If you want a socket to make things easier to connect; you need a motion plus which you can open up and easily remove the socket from, or an extension cable. A second-hand Motion Plus may be cheaper and far easier to find than an extension cable.

I interfaced a number of Wii controllers to a PICAXE - Nunchuck, Motion Plus ( black and white ), Guitar Hero Drums and Guitar, DJ Hero Turntable, Jog sensor and U-Draw Graphic Tablet - but no actual controller pads because I never found one in a charity shop or at a boot sale cheap enough, and they were too expensive to buy new or second-hand just to prove they worked. Should be easy enough to use though.

Note they are all 3V3 only devices so don't connect to 5V. They are low current so it is recommended to power them from a PICAXE I/O pin so they can be power-cycled.

There are some differences between official and third-party controllers but it's relatively straight forward to interface to them, decode them, and use them.
 

Gramps

Senior Member
you need a motion plus which you can open up and easily remove the socket from
The cheapest one we saw on line was 8 bucks. Hate to pay that much!!
Chopping the plug off!!!
They are low current so it is recommended to power them from a PICAXE I/O pin so they can be power-cycled.
power them from a PICAXE I/O pin???
so they can be power-cycled???
New concept🙄
hippy, do you have code snippet that will give us some numbers in the terminal?
My son, (old bit collector), said that I2c runs this controller.
Found this link on the Forum
 
Last edited:

lbenson

Senior Member
From 2011, I have this, but I don't remember anything about it other than that I got it working. Probably somebody else's code, maybe Hippy's:
Code:
'20Nchk1 reads joystick and buttons
#picaxe 20x2


Symbol joystick_x = b30
Symbol joystick_y = b31
Symbol Accel_X = b32
Symbol Accel_y = b33
Symbol Accel_z = b34
Symbol Accel_buttons = b35 ' lower 2 bits of accel & Z,C button states
Symbol xOld = b36
Symbol yOld = b37

Symbol CZ0old = bit0 ' CZ0 and CZ1 describe button positions:
Symbol CZ1old = bit1 ' 00=Z pressed; 01=both pressed ; 10=C pressed ; 11=neither pressed
Symbol changed = bit2
Symbol CZ0 = bit24 ' CZ0 and CZ1 describe button positions:
Symbol CZ1 = bit25 ' 00=Z pressed; 01=both pressed ; 10=C pressed ; 11=neither pressed

Symbol nunchukaddress = $A4

Init:
  pause 10
  hi2csetup i2cmaster, nunchukaddress, i2cslow, i2cbyte
  hi2cout ($40,$00)
  pause 1

main:
  do
    gosub readNunchuk
    changed = 0
    if CZ0 <> CZ0old then
      changed = 1
      CZ0old = CZ0
    endif
    if CZ1 <> CZ1old then
      changed = 1
      CZ1old = CZ1
    endif
    if joystick_x <> xOld then
      changed = 1
      xOld = joystick_x
    endif
    if joystick_y <> yOld then
      changed = 1
      yOld = joystick_y
    endif
    if changed = 1 then
      sertxd(#joystick_x, " ", #joystick_y, " ", #CZ0, " ", #CZ1,cr,lf)
    endif
'    pause 2000
  loop

readNunchuk:
  hi2cout (0)
'  pause 1
  hi2cin (joystick_x,joystick_y,Accel_X,Accel_Y,Accel_Z,Accel_buttons)
  b3 =Accel_buttons^0x17 + 0x17    'decrypt button state
'                      '"Z" Button pressed = 00 or 01
'                      '"C" button pressed = 01 or 10
                            'Bits 2-3: X acceleration 2 LSBs
                            'Bits 4-5: Y acceleration 2 LSBs
                            'Bits 6-7: Z acceleration 2 LSBs

  joystick_x= joystick_x^0x17 + 0x17    'Decrypts x-axis Value of joystick 
                            'Min(Full Left): 46
                            'Medium(Center): 172
                            'Max(Full Right): 255
            

  joystick_y=joystick_y^0x17 + 0x17      'decrypts y-axis value of joystick
                            'Min(Full Down): 46
                            'Medium(Center): 131
                            'Max(Full Right): 255
  return
This is for a nunchuk--don't know if it would work for your controller.
 

hippy

Technical Support
Staff member
you need a motion plus which you can open up and easily remove the socket from
The cheapest one we saw on line was 8 bucks. Hate to pay that much!!
Chopping the plug off!!!
$8 is expensive but it can be a good investment and will prove indispensable if you want to test other controllers. It's just so much easier to plug a controller in, no need to open, no need to cut wires or work out how it is wired, and it remains undamaged so can still be used with a Wii, reused by someone else.

In the UK Motion Plus are about $4 (£3.50) second-hand. Might be worth trying to find a Jog if you can as they have a socket and are less than $1 (0.50p) second-hand here.

I don't have Controller code per se but the starting point is checking the Controller can be detected. Attached plus my Nunchuck code.
 

Attachments

Top