joan2937 / pigpio

pigpio is a C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).
The Unlicense
1.45k stars 407 forks source link

How to create a wave chain on two gpio simultaneously and with different frequencies #535

Open mahdigh782 opened 2 years ago

mahdigh782 commented 2 years ago

Hello I try to run two stepper motor drivers at the same time. Since synchronicity is important to me, I tried to run two wave chains at the same time, but when the second chain starts, the first chain stops. Is there a way to solve my problem? Or is there a library that produces the exact number of pulses and frequencies? I also checked and found that the pwm software generated by the pigpiod is accurate but can not control the number of pulses. I also used the callback function but it does not respond at high frequencies. Thank you

guymcswain commented 2 years ago

Is there a way to solve my problem?

Yes, very likely. If you still have a need and you could not find a solution from searching past issues, then let me know and I will try to help you.

mahdigh782 commented 2 years ago

Yes, very likely. If you still have a need and you could not find a solution from searching past issues, then let me know and I will try to help you.

Yes, I haven't set up the two stepper motor drives yet. Just note that stepper motors operate at different frequencies and with different number of pulses. Thanks