Skip to content

Commit dee583b

Browse files
authored
Merge pull request #147 from engmung/dev
fix(firmware): invert encoder direction for Bourns PEC11R
2 parents cb36391 + 2d17615 commit dee583b

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

firmware/encoder_test/encoder_test.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#define ENC4_B 18
3636
#define ENC4_SW 1
3737

38-
#define INVERT_ENCODER 1 // matches main firmware; flip if direction is wrong
38+
#define INVERT_ENCODER 0 // matches main firmware; flip if direction is wrong
3939

4040
const int ENC_A[4] = { ENC1_A, ENC2_A, ENC3_A, ENC4_A };
4141
const int ENC_B[4] = { ENC1_B, ENC2_B, ENC3_B, ENC4_B };

firmware/patternflow/config.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@
8383
#define ENC4_SW 1
8484

8585
// --- Hardware Settings ---
86-
#define INVERT_ENCODER 1
86+
// 0 for the official Bourns PEC11R-4220F-S0024 (used on the simplified
87+
// revision board); set to 1 if rotation reads reversed (e.g. AliExpress
88+
// clones, or encoders mounted on the back of the PCB).
89+
#define INVERT_ENCODER 0
8790
#define DEFAULT_BRIGHTNESS 204 // 80% (0-255)
8891

8992
// --- LED Panel Color Calibration ---

0 commit comments

Comments
 (0)