Controller class. More...
Public Member Functions | |
| def | __init__ (self, motorUnit, encoders) |
| Controller initializer. More... | |
| def | goToPosition (self, motor, encoder, position) |
| Gets the table to Position. More... | |
| def | enableMotors (self) |
| Enables motors. More... | |
Public Attributes | |
| motorBase | |
| motor1 | |
| motor2 | |
| encoder1 | |
| encoder2 | |
| max | |
Controller class.
Incorperates motor and encoder driver to create a position cotrolled motor
| def comboDriver.Controller.__init__ | ( | self, | |
| motorUnit, | |||
| encoders | |||
| ) |
Controller initializer.
Initializes the class and saves the necessary parameters as self.variables so that they may be used in different methods of the class.
| motorUnit | A MotorBase object consisting of 2 DC motors |
| encoders | A list of encoders associated with the the DC motors on the MotorBase |
| def comboDriver.Controller.enableMotors | ( | self | ) |
Enables motors.
Enable both motors of the MotorBase by setting the sleep pin low
| None |
| def comboDriver.Controller.goToPosition | ( | self, | |
| motor, | |||
| encoder, | |||
| position | |||
| ) |
Gets the table to Position.
Sets appropriate motor duty to achieve desired postion and makes sure we get there.
| motor | The motor to move to a desired position |
| encoder | The encoder associated wtih the motor |
| position | The desired position for the motor |