Skip to content

keypad initialization errors #1

Open
@tbatmanb

Description

@tbatmanb

Hi,
the keypad init routine contains two errors which are leading to wrong operation of other IO Pins.

please modify lines 349, 350, 537, 538 as shown below.
old 349 for (int i=8; i<(columns * 2); i++) // this couldn't work as desired
old 350 tempWord |= (1<<i);

new 349 for (int i=0; i<columns; i++) // this way, it works as desired
new 350 tempWord |= (1<<(i+8)); // <--- i+8

old 537 for (int i = 0; i < (8 + numCols); i++) // this couldn't work as desired
old 538 debouncePin(i);

new 537 for (int i = 0; i < (numCols); i++) // this way, it works as desired
new 538 debouncePin(i + 8); // <--- i+8

;-) one beer less ware
best regards
thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions