Digital pins have several names. There's the silk-screened name (i.e.
0, 1, 2, ...), the Arduino Digital name (i.e. D0, D1, D2, ...), and the
Arduino Analog name (i.e. A0, A1, A2, ...).
Inside input.cpp, we canonicalize the input pin to ensure it is
accurate. However, the logic was inverted, and instead of masking off
everything but the pin number, we were masking off the pin number and
leaving everything else.
This caused the pin number to always be set to pin 0.
Invert this logic to leave only the lower three bits.
Digital pins have several names. There's the silk-screened name (i.e. 0, 1, 2, ...), the Arduino Digital name (i.e. D0, D1, D2, ...), and the Arduino Analog name (i.e. A0, A1, A2, ...).
Inside input.cpp, we canonicalize the input pin to ensure it is accurate. However, the logic was inverted, and instead of masking off everything but the pin number, we were masking off the pin number and leaving everything else.
This caused the pin number to always be set to pin 0.
Invert this logic to leave only the lower three bits.
This closes issue #163.
Signed-off-by: Sean Cross sean@xobs.io