This commit is contained in:
shrkey
2016-10-18 23:27:33 +01:00
parent ee4dd4bd8c
commit 08a1458328

12
640.md
View File

@@ -152,7 +152,7 @@ You have now enabled the interfaces you need to use your board.
## Programming the 640
### Using the Python libraries
### Installing the Python libraries
The Python libraries for the 640 board and some example scripts are available via our GitHub repository. To install them open a terminal window on your Raspberry Pi (unless you are running with only the command line) and enter the following:
@@ -442,7 +442,7 @@ 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.
### Using the C++ libraries
### Installing the C++ libraries
The C++ libraries for the 640 board and some example scripts are available via our GitHub repository. To install them open a terminal window on your Raspberry Pi (unless you are running with only the command line) and enter the following:
@@ -529,7 +529,7 @@ $ make
$ sudo ./AccelGyroMag
```
#### The C++ API
### The C++ API
If you take a look at the code in each of the examples you should be able to get an idea of how the 640 board API works. We'll go into more detail of each of the available commands below.
@@ -558,7 +558,7 @@ int main()
}
```
##### Create a controller
#### Create a controller
The **DW640** object controls access to all the elements on the 640 board, so the first thing we need to do is create a controller - we pass in the address of the 640 board as a parameter - the default address is 0x60 so if you haven't changed the address then you can leave this out.
@@ -569,7 +569,7 @@ dw.initialize();
Now that we have the controller created, we can access all the connectors on the board.
##### Select a Motor
#### Select a Motor
There are 6 motor ports on the 640 board numbered 1 to 6 from left to right (with the ports facing you ).
@@ -579,7 +579,7 @@ If we want to control a motor on port number 1 then we need to request the motor
DW_Motor *dw1 = dw.getMotor(1);
```
##### Motor driving
#### Motor driving
There are two main commands that you can give a motor - to move in a direction and to stop.