Comments (4)
And here some additional information from the logic analyser (same code, different board):
Arduino | Wemos D1 |
---|---|
Setup Write to [0xA4] + ACK | Setup Write to [0xA4] + ACK |
0xF0 + ACK | 0xF0 + ACK |
0x55 + ACK | 0x55 + ACK |
Setup Write to [0xA4] + ACK | Setup Write to [0xA4] + ACK |
0xFB + ACK | 0xFB + ACK |
0x00 + ACK | 0x00 + ACK |
Setup Write to [0xA4] + ACK | Setup Write to [0xA4] + ACK |
0xFA + ACK | 0xFA + ACK |
Setup Read to [0xA5] + ACK | Setup Read to [0xA5] + ACK |
0x00 + ACK | 0x00 + ACK |
0x00 + ACK | Setup Write to [0xFE] + NAK |
0xA4 + ACK | 0xFE + NAK |
0x20 + ACK | 0xFE + NAK |
0x01 + ACK | 0xFE + NAK |
0x01 + NAK | 0xFF + Missing ACK/NAK |
Setup Write to [0xA4] + ACK | |
0x00 + ACK | |
Setup Read to [0xA5] + ACK | |
0x20 + ACK | |
0x20 + ACK | |
0x10 + ACK | |
0x00 + ACK | |
0xFF + ACK | |
0xFF + NAK |
from nintendoextensionctrl.
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
Wire.begin();
Wire.setClock(10000L);
controller.begin();
// ...
Will do further test tomorrow and (probably) close that issue.
from nintendoextensionctrl.
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 connect
function may return false
because the controller's identity string no longer matches the Classic Controller. Power cycle the controller to fix the issue. I don't think that's your problem, but that issue may interfere with your testing.
Do you have access to an oscilloscope? I would look at the signal directly if you can.
from nintendoextensionctrl.
It's been two weeks without an update, I'm assuming this is solved. Feel free to re-open if you still have issues.
from nintendoextensionctrl.
Related Issues (16)
- Incompatible with Adafruit-PWM-Servo-Driver-Library HOT 2
- 3rd Party NES Classic with ESP32 Issues HOT 10
- Working then non readable data HOT 5
- Support Question HOT 3
- Who's software am I using? HOT 5
- 8BitDo Retro Receiver gives garbage data HOT 10
- Specifying Serial port for .print functions during declaration? HOT 6
- Genuine NES Classic Controller hangs at connection time. Any ideas? HOT 4
- Genuine Classic Controller does not Initialize/Connect properly with your XInput AVR Library HOT 7
- Not an issue - but... HOT 3
- Mini Controller Implementation Should Use "High Resolution" Mode HOT 1
- Change success condition for getHighRes/setHighRes HOT 24
- Non genuine classic controller not initialised with classic.begin(); but can get data with controller.begin(); HOT 9
- I2C pins a beginner's question HOT 4
- Issue with non genuine Nes looking classic controller HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nintendoextensionctrl.