You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have found an issue about PCNT using FastAccelStepper and ESP32Encoder library on same project.
Behaviour seems indicate that both library use same PCNT unit, despite recent change done on each library about PCNT handling.
Here is my code about encoder and stepper :
This way the stepper motor can move and his behaviour is OK, but encoder 's count is reset proportionally to the stepper speed.
I have tried to manually change the PCNT unit used by both library, but I am not competent enough to make it work.
Nevertheless, I have found a workaround to make it work. It consist of create a first encoder i.e. "encoder0" (which will work on same PCNT unit that the stepper motor) AND to attach pins to it. If .attach() is not used, the workaround doesn't work.
Hello,
I have found an issue about PCNT using FastAccelStepper and ESP32Encoder library on same project.
Behaviour seems indicate that both library use same PCNT unit, despite recent change done on each library about PCNT handling.
Here is my code about encoder and stepper :
This way the stepper motor can move and his behaviour is OK, but encoder 's count is reset proportionally to the stepper speed.
I have tried to manually change the PCNT unit used by both library, but I am not competent enough to make it work.
Nevertheless, I have found a workaround to make it work. It consist of create a first encoder i.e. "encoder0" (which will work on same PCNT unit that the stepper motor) AND to attach pins to it. If .attach() is not used, the workaround doesn't work.
Issue posted on FastAccelStepper repository :
#gin66/FastAccelStepper#148 (comment)
In hope this could be used to improve both libraries ;).
The text was updated successfully, but these errors were encountered: