
Crazy Stepper on Stepper Action
2 years ago
My stepper motors have 200 steps in one revolution, that is: You need to send them 200 'pulses' at a regular interval for them to rotate smoothly.
There are two ways to do this in software:
1. send a pulse, wait X microseconds, send next pulse. this is blocking, meaning you cant do anything else because all your time is spent waiting.
2. check to see if its time to send a pulse, and send it if you can. if you can, then step, note the time, and continue. this is non blocking, because you aren't waiting... you're just regularly checking. this means you can do things in the background, or control multiple motors. its also sort of tricky.
in this video, i finally got my non-blocking stepper code working!!!
more here: make.rrrf.org/smd-1.0
There are two ways to do this in software:
1. send a pulse, wait X microseconds, send next pulse. this is blocking, meaning you cant do anything else because all your time is spent waiting.
2. check to see if its time to send a pulse, and send it if you can. if you can, then step, note the time, and continue. this is non blocking, because you aren't waiting... you're just regularly checking. this means you can do things in the background, or control multiple motors. its also sort of tricky.
in this video, i finally got my non-blocking stepper code working!!!
more here: make.rrrf.org/smd-1.0
-
Vimeo: About / Blog / Developers / Jobs / Community Guidelines / Community Forums / Help Center / Site Map / Merchandise
/ Get Vimeo

Previous Week
watch out!