Stepper Motor API
Stepper-motor motion maths as an API, computed locally and deterministically — the steps-per-millimetre and speed numbers a 3D-printer, CNC or robotics builder configures a machine with. The leadscrew endpoint gives the steps per mm for a lead-screw or ball-screw axis: (motor steps per revolution × microstepping) ÷ the screw lead, so a 1.8° motor (200 steps) at 16 microsteps on an 8 mm-lead screw is 400 steps/mm with 2.5 µm of resolution — the value that goes straight into the firmware. The belt endpoint does the same for a belt-and-pulley axis, where the travel per motor turn is the pulley teeth × the belt pitch (GT2 belt = 2 mm), so a 20-tooth GT2 pulley gives the classic 80 steps/mm of a 3D-printer X/Y axis, and shows the speed-versus-precision trade of a bigger pulley. The speed endpoint turns a steps-per-mm and a step pulse rate into the axis speed in mm/s and mm/min — at 80 steps/mm a 40 kHz step rate is 500 mm/s, though the real limit is the motor stalling at high step rates and the controller pulse ceiling. It also notes that microstepping adds smoothness, not true accuracy, since torque per microstep falls. Everything is computed locally and deterministically, so it is instant and private. Ideal for 3D-printer and CNC firmware setup, motion-control and robotics tools, and maker calculators. Pure local computation — no key, no third-party service, instant. Ideal-geometry estimates — leave a margin below the theoretical top speed. 3 compute endpoints. For CNC surface finish use a CNC-finish API; for gear ratios a gear-ratio API.
api.oanor.com/steppermotor-api