From 43cfe622b5714bca26ddb2ac74a4dfef8d1d19a9 Mon Sep 17 00:00:00 2001 From: shrkey Date: Mon, 26 Sep 2016 00:29:24 +0100 Subject: [PATCH] stepper commands --- 640.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/640.md b/640.md index 9920b29..2bc7670 100644 --- a/640.md +++ b/640.md @@ -243,6 +243,15 @@ stepper1.oneStep(dw_Controller.REVERSE, dw_Controller.DOUBLE) ##### step( *steps*, *direction*, *style* ) +If you want to move the stepper motor a set number of steps then you can use this command. This, however, will stop all processing until the motor has moved the specified number of steps. + +``` python +stepper1.step(200, dw_Controller.FORWARD, dw_Controller.SINGLE) +stepper1.step(200, dw_Controller.REVERSE, dw_Controller.DOUBLE) +``` + +If you want more control and need to move two or more motors at the same time then you should use the **oneStep** command. + ## C++ ### Introduction