From a6c9bd8632b63302cbfdb84112d30c58604746b2 Mon Sep 17 00:00:00 2001 From: shrkey Date: Sun, 25 Sep 2016 23:03:01 +0100 Subject: [PATCH] more docs --- 640.md | 27 ++++++++++++++++++++++++++- escape.html | 2 +- expansions.html | 2 +- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/640.md b/640.md index 2794d37..f93951c 100644 --- a/640.md +++ b/640.md @@ -105,7 +105,7 @@ We can also stop the motor by using the second command and passing a speed of 0 m1.setMotorSpeed(0) ``` -The **setMotorSpeed* command allows you to specify the speed of each motor - there are two different speed ranges the first goes from *-255* to *255*, the second from *1000* to *2000*. +The **setMotorSpeed** command allows you to specify the speed of each motor - there are two different speed ranges the first goes from *-255* to *255*, the second from *1000* to *2000*. If you are familiar with radio control vehicles and ESC motors then you will recognise the second range. @@ -171,8 +171,33 @@ m1.setMotorSpeed(1250) #### Select a Servo +There are two servo ports on the 640 board + #### Servo control +#### Select a Stepper motor + +You can control up to 3 stepper motors with the 640 board - each stepper motor uses two motor ports for 4 wire stepper motors and three motor ports for 5 wire stepper motors. + +Running 5 wire stepper motors is almost the same as 4 wire stepper motos but requires a small extra step which we'll explain at the end. + +Each stepper motor is assigned to a pair of motor ports: +- **Stepper motor 1** - uses motor ports 1 and 2 +- **Stepper motor 2** - uses motor ports 3 and 4 +- **Stepper motor 3** - uses motor ports 5 and 6 + +The first step is to identify the two wires for each coil on your stepper motor (you may need to read the technical documentation for your motor to find this out) and attach these two wires to each port. + +*Example: You have a stepper motor with 4 wires - orange, pink, yellow and blue. If the orange and pink wires for your stepper motor are attached to coil one then attach these wires to motor port 1, attach the two remaining wires to motor port 2.* + +Once you have your stepper motor wired up you need to request the relevant stepper motor object from the controller. + +``` python +stepper1 = dw.getStepper(1) +``` + +#### Stepper motor control + ## C++ ### Introduction diff --git a/escape.html b/escape.html index d7cc65b..5486e33 100644 --- a/escape.html +++ b/escape.html @@ -37,7 +37,7 @@ }); - +
diff --git a/expansions.html b/expansions.html index a51ca09..ae65235 100644 --- a/expansions.html +++ b/expansions.html @@ -37,7 +37,7 @@ }); - +