New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Classic Controller not detected on Wemos D1 mini boards #53
Comments
And here some additional information from the logic analyser (same code, different board):
|
OK, I guess, I resolved it: Wemos D1 (all ESPs?) seems just to be on speed 😜. ESPs/D1's default i2s speed is 400k. Everything's working with
Will do further test tomorrow and (probably) close that issue. |
I don't have a D1, but I just tested with a NodeMCU ESP8266 and didn't find any issues. My guess is that it's a pull-up problem, particularly if reducing the speed helps. All of the Nintendo extension controllers use pull-ups on the controller itself rather than the host because the wire length (bus capacitance) varies wildly depending on the controller. Chinese controllers are notorious for foregoing these pull-ups. I'd recommend using a multimeter to check the pull-ups on your own Classic Controller. You mentioned trying some 4.7k pull-ups so you may have the opposite problem with the pull-ups being too strong, particularly if you have another device on the same bus with its own pull-ups. The AVR Arduinos also enable their internal pull-ups for the I2C bus by default (~30K) while other microcontrollers don't. Because the primary pull-ups are on the controller and not the master, some microcontrollers like the Teensy will hang waiting for I2C response if the controller is disconnected since it leaves the bus floating. A weak pull-up fixes this - I've had good results with ~47K. Lastly, the genuine Classic Controllers don't like being re-initialized. If you reset the microcontroller without powering down the controller, the Do you have access to an oscilloscope? I would look at the signal directly if you can. |
It's been two weeks without an update, I'm assuming this is solved. Feel free to re-open if you still have issues. |
Hey Dave,
some days ago I found your lib and it works like a charm with my cheap chinese classic controller pad. For my first test I used an Arduino Micro.
For the main project (a self coded tetris clone) I want to use an ESP8266 (Wemos D1 mini) especially for its wifi support. Unfortunately same example code (that worked on the Micro) won't work on my D1 board. I think, its not an core i2c or wiring problem, because an BME280 sensor I put on the same i2c line works without problem. I even tried to ad the usual 4k7 pull-ups - without any change. The .connect() always returns false (without any delay), and I have no idea how to fix it.
For debugging I also used the usual i2c-scan sketch that that found an device on 0x52 - obviously the controller. anyway, communication seems not possible on the D1. Do you have any idea why this issue appears on my D1 board? Is that a similar problem as in issues #33?
Cheers.
Olli
The text was updated successfully, but these errors were encountered: