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


raspberrypi



Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support