minilib Library¶
Documentation for the Library
minilib.ArcadeDrive
¶
-
class
minilib.Drive.
ArcadeDrive
(self, left, right)¶ -
__init__
(self, left, right)¶ Setup Arcade drive
Parameters: - left – left side drive
- rightServo (continuous_servo) – right side drive
-
drive
(self, forwardPower, steerPower)¶ Drive given the forward and steer axis power Meant to be run inside a while loop
Parameters: - forwardPower (float) – Forward power from joystick axis
- steerPower (float) – Steer power from joystick axis
-
minilib.TankDrive
¶
-
class
minilib.Drive.
TankDrive
(self, left, right)¶ -
__init__
(self, left, right)¶ Setup Arcade drive
Parameters: - left – left side drive
- rightServo (continuous_servo) – right side drive
-
drive
(self, leftPower, rightPower)¶ - Drive given the left and right axis power
- Meant to be run inside a while loop
Parameters: - leftPower (float) – Forward power from joystick axis
- rightPower (float) – Steer power from joystick axis
-
minilib.Joystick
¶
-
class
minilib.Joystick.
Joystick
(self, ID, deadband=0)¶ -
__init__
(self, ID, deadband=0)¶ Setup Joystick control using pygame :param id: ID of the joystick :type id: int
-
getAxis
(self, axisID)¶ Get the value of the axis
Parameters: axisID (int) – Id of the axis Returns: value of the axis Return type: float
-
getButton
(self, buttonID)¶ Get the state of the button
Parameters: buttonID (int) – Id of the button Returns: state of the button Return type: bool
-