new structure
This commit is contained in:
19
640.md
19
640.md
@@ -44,7 +44,7 @@ This script will start each motor port, in the forwards direction, in turn from
|
|||||||
$ python 640motortest.py
|
$ python 640motortest.py
|
||||||
```
|
```
|
||||||
|
|
||||||
**640servotest.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:
|
This script will move any servos connected to the servo headers left, then center, then right. To run the script enter the following:
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ This script will move any servos connected to the servo headers left, then cente
|
|||||||
$ python 640servotest.py
|
$ python 640servotest.py
|
||||||
```
|
```
|
||||||
|
|
||||||
**640steppertest.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.
|
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.
|
||||||
|
|
||||||
@@ -62,19 +62,24 @@ Each stepper will be moved forwards and backwards through 200 steps when the tes
|
|||||||
$ python 640steppertest.py
|
$ python 640steppertest.py
|
||||||
```
|
```
|
||||||
|
|
||||||
### Import libraries
|
### The 640 board API
|
||||||
|
|
||||||
Now you know everything works, it's time to write your own scripts. So create a new python script in your editor, within the *darkwater_python_640* directory with a memorable name and add the following lines to import our libraries:
|
Now you know everything works, it's time to write your own scripts. So create a new python script in your editor, within the *darkwater_python_640* directory with a memorable name and add the following lines to import our libraries:
|
||||||
|
|
||||||
``` python
|
``` python
|
||||||
import time
|
import time
|
||||||
from darkwater_640.darkwater_640 import dw_Controller, dw_Motor
|
from darkwater_640.darkwater_640 import dw_Controller, dw_Motor, dw_Servo
|
||||||
```
|
```
|
||||||
|
|
||||||
### Drive a motor
|
#### Create a controller
|
||||||
|
|
||||||
### Motor speed
|
#### Select a Motor
|
||||||
### Servo control
|
|
||||||
|
#### Motor driving
|
||||||
|
|
||||||
|
#### Select a Servo
|
||||||
|
|
||||||
|
#### Servo control
|
||||||
|
|
||||||
## Node.JS
|
## Node.JS
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user