diff --git a/640.md b/640.md index e47cf36..91b396a 100644 --- a/640.md +++ b/640.md @@ -16,13 +16,51 @@ The 640 board is used to drive up to 6 DC motors and 2 Servo motors. ### Introduction -Test +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: ``` bash -git clone https://github.com/darkwaterfoundation/darkwater_python_640.git +$ git clone https://github.com/darkwaterfoundation/darkwater_python_640.git ``` -### Import libraries +### Example scripts + +Now that you have downloaded the 640 libraries you should have a new directory called **darkwater_python_640**, so let's move into that directory + +``` bash +$ cd ./darkwater_python_640 +``` + +If you list the files in this directory, you should see a few test scripts + +``` bash +$ ls -al +``` + +#### 640motortest.py + +This script will start each motor port, in the forwards direction, in turn from left to right and then do the same backwards. To run the script enter the following: + +``` bash +$ python 640motortest.py +``` + +#### 640servotest.py + +This script will move any servos connected to the servo headers left, then center, then right. To run the script enter the following: + +``` bash +$ python 640servotest.py +``` + +#### 640steppertest.py + +This script divides the 6 motor ports into 3 stepper motor ports. Motor 1 and 2 will be stepper 1, motor 3 and 4 will be stepper 2 and motor 5 and 6 will be stepper 3. + +Each stepper will be moved forwards and backwards through 200 steps when the test script is run: + +``` bash +$ python 640steppertest.py +``` ### Drive a motor ### Motor speed ### Servo control