PFMATE: this class provides motor control functions.
More...
PFMATE: this class provides motor control functions.
def mindsensors.PFMATE.__init__ |
( |
|
self, |
|
|
|
pfmate_address = PFMATE_ADDRESS |
|
) |
| |
Initialize the class with the i2c address of your PFMate.
- Parameters
-
self | The object pointer. |
pfmate_address | Address of your PFMate. |
def mindsensors.PFMATE.command |
( |
|
self, |
|
|
|
cmd |
|
) |
| |
Writes a specified command on the command register of the PFMate.
- Parameters
-
self | The object pointer. |
cmd | The command you wish the PFMate to execute. |
def mindsensors.PFMATE.controlBothMotors |
( |
|
self, |
|
|
|
channel, |
|
|
|
operationA, |
|
|
|
speedA, |
|
|
|
operationB, |
|
|
|
speedB |
|
) |
| |
Controls both motors.
- Parameters
-
self | The object pointer. |
channel | Communication channel to transmit to LEGO PF IR receiver (1-4). |
operationA | Operation command for motor A (0 = Float, 1 = Forward, 2 = Reverse, 3 = Brake). |
speedA | Speed of motor A (0-7). |
operationB | Operation command for motor B (0 = Float, 1 = Forward, 2 = Reverse, 3 = Brake). |
speedB | Speed of motor B (0-7). |
def mindsensors.PFMATE.controlMotorA |
( |
|
self, |
|
|
|
channel, |
|
|
|
operationA, |
|
|
|
speedA |
|
) |
| |
Controls motor A.
- Parameters
-
self | The object pointer. |
channel | Communication channel to transmit to LEGO PF IR receiver (1-4). |
operationA | Operation command for motor A (0 = Float, 1 = Forward, 2 = Reverse, 3 = Brake). |
speedA | Speed of motor A (0-7). |
def mindsensors.PFMATE.controlMotorB |
( |
|
self, |
|
|
|
channel, |
|
|
|
operationB, |
|
|
|
speedB |
|
) |
| |
Controls motor B.
- Parameters
-
self | The object pointer. |
channel | Communication channel to transmit to LEGO PF IR receiver (1-4). |
operationB | Operation command for motor B (0 = Float, 1 = Forward, 2 = Reverse, 3 = Brake). |
speedB | Speed of motor B (0-7). |
The documentation for this class was generated from the following file:
- PiStorms/sys/mindsensors.py