tttapa / Control-Surface

Arduino library for creating MIDI controllers and other MIDI devices.
GNU General Public License v3.0
1.19k stars 134 forks source link

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

Open tainalo2 opened 1 year ago

tainalo2 commented 1 year ago

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

To Reproduce

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 commented 1 year ago

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 39182bbab79487236c11579db3acfa336813bf54).

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 commented 1 year ago

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