Have you established whether or not the encoder library you are using works correctly if you upload a program that only reads the encoder by rotating your gearmotor’s shaft manually. (You should not have to generate any PWM signals for that test.) If you rotate the gearbox output shaft 360°, then the program should report around 210 counts. (Factoring in the gear ratio of product #4801, the encoder provides 211.2 counts per revolution.)
- Patrick
