405 Documentation  9.0
comboDriver.Controller Class Reference

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
 

Detailed Description

Controller class.

Incorperates motor and encoder driver to create a position cotrolled motor

Constructor & Destructor Documentation

◆ __init__()

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.

Parameters
motorUnitA MotorBase object consisting of 2 DC motors
encodersA list of encoders associated with the the DC motors on the MotorBase

Member Function Documentation

◆ enableMotors()

def comboDriver.Controller.enableMotors (   self)

Enables motors.

Enable both motors of the MotorBase by setting the sleep pin low

Parameters
None

◆ goToPosition()

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.

Parameters
motorThe motor to move to a desired position
encoderThe encoder associated wtih the motor
positionThe desired position for the motor

The documentation for this class was generated from the following file: