|
Plot Something - ME 405 Term Project
|
This class implements a motor driver for an ME405 kit. More...
Public Member Functions | |
| def | __init__ (self, en_pin, in1pin, in2pin, timer) |
| Creates a motor driver by initializing GPIO pins and turning the motor off for safety. More... | |
| def | enable (self) |
| Enables the motor, allowing power to it. | |
| def | disable (self) |
| Disables the motor, preventing power to it. | |
| def | set_duty_cycle (self, duty) |
| This method sets the duty cycle to be sent to the motor to the given level. More... | |
This class implements a motor driver for an ME405 kit.
| def motor_agena_chiu.MotorDriver.__init__ | ( | self, | |
| en_pin, | |||
| in1pin, | |||
| in2pin, | |||
| timer | |||
| ) |
Creates a motor driver by initializing GPIO pins and turning the motor off for safety.
| en_pin | pin for enabling the motor. |
| in1pin | pin 1 to control the motor. |
| in2pin | pin 2 to control the motor. |
| timer | timer to use for motor channels. |
| def motor_agena_chiu.MotorDriver.set_duty_cycle | ( | self, | |
| duty | |||
| ) |
This method sets the duty cycle to be sent to the motor to the given level.
Positive values cause torque in one direction, negative values in the opposite direction.
| duty | A signed integer holding the duty cycle of the voltage sent to the motor |