Closed rhaamo closed 2 years ago
Hi,
I'm sorry, I have no idea on what's going on here. Did you press any key during that log output, or was it just a log in a loop without any interaction from your side ?
Also, you might want to use interrupts instead of continuously looping on reading values 🙂
Hi, yes the output changed when I was pressing buttons.
I think I can try to add something like in PortCopyOnInterrupt
that wouldn't be too complex while keeping column state info.
Closing this, feel free to reopen if needed 🙂
I am using two mux (for the moment) to read a keyboard matrix, one mux uses all pins of both ports as outputs, the other one only 7 of port A as inputs (there is a diode from col to row on each key). The MCU is a teensy 4.1.
I am using a
Serial.println(mcpRows.readPort(MCP23017Port::A), BIN);
to check the activated rows but I am getting some weird output, at first it seems to shows the 8 pins, then when I start pressing a key it shows 6 digits, then maybe only one, 4, etc. any ideas what can be the issue ?Code:
example output: