Skip to content
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

Arduino Leonardo freezing on start with MCP23017 rotary encoders examples codes #920

Open
tainalo2 opened this issue Apr 28, 2023 · 2 comments

Comments

@tainalo2
Copy link

Describe the bug
When starting Leonardo with MCP23017 examples code implement, if SDA linked then arduino freezing.

To Reproduce

  • Link an MCP23017 to an arduino Leonardo as explain in documentation
  • Push official MCP23017-RotaryEncoder-No-Interrupts.ino code without change
  • Reset Arduino Leonardo after upload
  • Arduino is freezing and not appearing in PC USB device
  • Unlink SDA and Reset
  • Arduino appearing on PC USB but you can't use the MCP23017

Expected behavior
Expecting not freezing and using rotary encoders over MCP23017

Code
Link to example test : https://github.com/tttapa/Control-Surface/blob/main/examples/1.%20MIDI%20Output/3.%20Rotary%20Encoders/MCP23017-RotaryEncoder-No-Interrupts/MCP23017-RotaryEncoder-No-Interrupts.ino

Precision
I have test my same installation with the Adafruit_MCP23X17.h and a button and it's working, to verify if my MCP23017 is working.

(thank you for your amazing library !)

@tttapa
Copy link
Owner

tttapa commented May 1, 2023

Thanks for the detailed report! I can't seem to reproduce the issue you describe with my setup (Official Arduino Leonardo, Arduino AVR Core 1.8.6, Control surface main 39182bb).

Could you list the versions of the libraries, cores and tools you're using?

You can try removing the Wire.setClock() line, I don't think the ATmega32U4 supports anything above 400 kHz.

@tainalo2
Copy link
Author

tainalo2 commented May 2, 2023

Hello,
SOLVED : i have comment "Wire.setClock()" line
Very thanks !

More precision :

Now i will try to create a prototype of 16 rotary encoders with two MCP23017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants