Multithreading GPIO - Raspberry Pi Forums
hi everyone, i'm working on project need move 2 stepper motors @ same time different speeds. using raspberry pi 2 model b, , know if possible execute 2 functions @ same time. example have function movesteppera(int steps, int time) , movestepperb(int steps,int time). each function should create pulse on different pin. i'm new python if tell me how appreciate it!
hello,
use 'threading'. there many tutorials on net, e.g. http://pymotw.com/2/threading/.
keep in mind raspberry python have limits in pulse frequency generation. steppers require high pulse rates when running @ moderate rotation rates. 1 rotation per second, 200 steps, 4 patterns per step 800 hz , in millisecond-range timings not accurate.
regards,
gerhard
use 'threading'. there many tutorials on net, e.g. http://pymotw.com/2/threading/.
keep in mind raspberry python have limits in pulse frequency generation. steppers require high pulse rates when running @ moderate rotation rates. 1 rotation per second, 200 steps, 4 patterns per step 800 hz , in millisecond-range timings not accurate.
regards,
gerhard
raspberrypi
Comments
Post a Comment