diff options
| author | Zach DeCook <zachdecook@librem.one> | 2023-05-28 09:54:14 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2023-05-29 20:30:49 -0400 |
| commit | 2a686a55c79b5db22a2227f5b0eac2f46ca7f7b4 (patch) | |
| tree | 9b29bc53db76f5076a1aa90404ec3d7256f7dbe4 /Rotary.patch | |
| parent | c9f4036651abbf3ceb75ba2d78a8411df07c6d6d (diff) | |
| download | HexBoard-2a686a55c79b5db22a2227f5b0eac2f46ca7f7b4.tar.gz | |
README: Add instructions for building with arduino-cli
and minor update to Makefile
Diffstat (limited to 'Rotary.patch')
| -rw-r--r-- | Rotary.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Rotary.patch b/Rotary.patch new file mode 100644 index 0000000..8cb27b4 --- /dev/null +++ b/Rotary.patch @@ -0,0 +1,21 @@ +diff --git a/libraries/Rotary/Rotary.cpp b/libraries/Rotary/Rotary.cpp +index 298925d..9d3a02a 100644 +--- a/libraries/Rotary/Rotary.cpp ++++ b/libraries/Rotary/Rotary.cpp +@@ -127,13 +127,9 @@ Rotary::Rotary(char _pin1, char _pin2) { + // Assign variables. + pin1 = _pin1; + pin2 = _pin2; +- // Set pins to input. +- pinMode(pin1, INPUT); +- pinMode(pin2, INPUT); +-#ifdef ENABLE_PULLUPS +- digitalWrite(pin1, HIGH); +- digitalWrite(pin2, HIGH); +-#endif ++ // Set pins to input pullup. ++ pinMode(pin1, INPUT_PULLUP); ++ pinMode(pin2, INPUT_PULLUP); + // Initialise state. + state = R_START; + } |
