I'm having a bit difficulty understanding this line here.
I could be wrong but it looks like in case K==0 the boolean would only work for switch 1 (n=0) and switch 5 (n=4), correct?
When S1 is pressed sw = [1, 0, 0, 0] and when S5 is pressed sw = [16, 0, 0, 0], in all other cases sw[K] would always be 0 and the function would not return a key pressed status.
Hello,
First of all thanks a lot for the lib.
I'm having a bit difficulty understanding this line here.
I could be wrong but it looks like in case
K==0
the boolean would only work for switch 1 (n=0) and switch 5 (n=4), correct?When S1 is pressed
sw = [1, 0, 0, 0]
and when S5 is pressedsw = [16, 0, 0, 0]
, in all other casessw[K]
would always be 0 and the function would not return a key pressed status.Note: this is related to https://github.com/thilaire/rpi-TM1638/pull/4 If it's not fixed it will report error at L171.