This work presents a programming logic developed within a code written in Python language, guiding engineering teaching. Where with this logic it is possible to command a test bench for a vehicle speed measurement system. This command is made through the amount of rotation of a stepper motor based on frequency values. In addition, the programming logic can be applied to other devices or equipment that contain stepper motors, in order to promote its command through its amount of rotation and acceleration.