I used stripcode's pigpio-stepper-motor library sofar to control three stepper motors for xyz direction of my Pi microscope. A single step in x or y direction does move view by 5µm, a single step in z direction by 4.4µm:
viewtopic.php?f=43&t=210605&p=1693060#p1693060
The library uses a deque internally for the 4(8) steps done with full(half) stepping, and always starts at position 0. When starting the lib no movement happens, but the end position of stepper motor wrt sequence might be any in 0..7 mod 8 for half-stepping. So the first step will do 1..8 steps in the direction requested for first step, from then on all is fine. But 8 steps does mean 7 steps off, or 35µm. This was not acceptable for my microscope application.
So I did a fork of stripcode's repo:
https://github.com/Hermann-SW/pigpio-st ... r#examples
New example keys_xyz.py does move the three steppers with LEFT/RIGHT/UP/DOWN/NPAGE/PPAGE keys, and ends script when pressing END key. In addition it does output the X/Y/Z coordinate at start and after each step of any of the stepper motors. That way the last position is known. When starting keys_xyz.py with passing last X/Y/Z coordinates as argv[1]..[argv[3], the example makes use of new pigpio-stepper-motor last default arg pos for each motor to rotate the deque to the correct starting position (mod len(sequence)). This way newly starting keys_xyz.py keeps at exactly the position it should in all 3 dimensions.
This is screenshot of open source libcamera qcam app, with "only" 1.05µm/pixel resolution. The centers of micrometer divisons at top are 10µm apart. Using raspistill "--roi" feature resolution is 0.21µm/pixel, centers of micrometer divisions are 48pixel apert then(!). At bottom right you see lanzet ball point:
