Hello folks ,
I hope someone can help me. I connected 12 buttons to a multiplexer. This also works except for 2 buttons that are read twice or I press button 8: output 0 and 8. I press button 0: output 0 and 4. I have software debounce. I even did this twice and when I realized it didn't make a difference, I threw it out of the code again. The whole thing worked without any problems, but after I installed a few shift registers to control the LEDs, the problem returned.
Hardware is a CD74HC4067 16 channel multiplexer connected to an ESP32 mini D1 via pins (2, 4, 12, 27); s0 s1 s2 s3 SIG pin =36. 100 kilo-ohm resistor SIG->ground. The buttons each have a 10 kilo-ohm resistor->ground. As I said, buttons 8 and 0 do not work as desired.
Another problem I have is that from a point in the program (shortly after initializing an RTC and the DFPlayer module) my serial communication no longer produces proper output and only shows boxes. Which of course really annoys me because it makes bug fixing very difficult.