I’m working on a small stepper motor driven vehicle powered by a Raspberry Pi 3B. For the motor control, I am using the hardPWM function of the pigpio library from Joan, which is working great. I can set two different frequencies, one for each channel. It’s coded in C.

Now, I would like to keep track of the number of taken steps for measurement and more control.

Is there a build-in way to count impulses of each frequency or catching the rising edge via interrupt?

Or even input a number of impulses for a certain frequency?

Or is there even a better way for all that?

I would be grateful for any help.

Thanks in advance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.