Using Knockoff NES Classic Mini Controller via I²C?

Got an idea for a project? Found a cool project you want to share? Post it here!
Post Reply
User avatar
obsidianspider
Posts: 98
Joined: Tue Sep 06, 2016 11:01 am
Has thanked: 134 times
Been thanked: 35 times

Using Knockoff NES Classic Mini Controller via I²C?

Post by obsidianspider » Fri Mar 30, 2018 9:38 pm

I bought a knockoff NES Classic Mini controller originally intending to hook it up to GPIO and use it via retrogame, but it was pointed out to me that these controllers communicate via I²C.

I've tried to get the controller to emulate key presses using two different methods, to no avail. This is my first time messing with I²C, so I admit I don't know what I'm doing, but I'd really like to use this as an opportunity to learn how to interact with I²C devices.

Method 1: Wii Classic Controller over I2C to Raspberry Pi

Method 2: wiiclassic-kbd

I've confirmed that the controller is recognized using i2cdetect, so I'm pretty sure I have it wired correctly.

Code: Select all

$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- 52 -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
i2cget shows that the chip seems to be doing something, so that's good.

Code: Select all

$ i2cget -y 1 0x52
0xff
i2cdump is showing all "ff" for each register.

Code: Select all

$ i2cdump -f -y 1 0x52
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
I'm not really sure what to make of it. I think this is because the chip isn't initiating. After some discussion on the discord chat the consensus seems to be that this may be a problem with initiating the chip because the code in the methods linked above are for working with a genuine Wii Classic controller, not a knockoff NES Classic Mini controller.

Can anyone lend any insight into how to proceed with trying to get this controller to communicate key presses via I²C to my Pi?

I think my next step is to try to send a command to initiate the chip and then see the status each step of the day, but I don't know how to go about doing that.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest