motor driving
This commit is contained in:
16
640.md
16
640.md
@@ -73,8 +73,24 @@ from darkwater_640.darkwater_640 import dw_Controller, dw_Motor, dw_Servo
|
||||
|
||||
#### Create a controller
|
||||
|
||||
The **dw_controller** 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
|
||||
|
||||
``` python
|
||||
dw = dw_Controller( addr=0x60 )
|
||||
```
|
||||
|
||||
Now that we have the controller created, we can access all the connectors on the board.
|
||||
|
||||
#### 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 ).
|
||||
|
||||
If we want to control a motor on port number 1 then we need to request the motor object for that port from our controller - this is very easily done with a single line
|
||||
|
||||
``` python
|
||||
m1 = dw.getMotor(1)
|
||||
```
|
||||
|
||||
#### Motor driving
|
||||
|
||||
#### Select a Servo
|
||||
|
||||
Reference in New Issue
Block a user