Motor Driver. More...
Classes | |
| class | motorDriver.MotorBase |
| Fault Section. More... | |
| class | motorDriver.DCMotor |
| Motor Driver Class. More... | |
Functions | |
| def | motorDriver.makeMotorBase (motors) |
| Function for making the motor base. More... | |
| def | motorDriver.makeMotors (freq=10000) |
| Motor Making function. More... | |
Motor Driver.
Runs the Motor.
Driver to interface the DC motors with the STM32 using PWM and the DRV8847 motor driver
Initializes a motor object when used by the user. This can be done with multiple different pin values in order to run more than one motor at a time. It uses timer channel objects and pulse width modulation to run the motors connected to the right pins at varying speeds. These pins can be attached to the same timer number, but must have different channels on that timer. Thus, they can run independently of each other.
| def motorDriver.makeMotorBase | ( | motors | ) |
Function for making the motor base.
Quickly make a MotorBase object given a tuple of 2 motor objects (from makeMotors() function
| motors | A tuple of 2 DCMotor objects |
| def motorDriver.makeMotors | ( | freq = 10000 | ) |
Motor Making function.
Quickly create to motow objects at a given frequncy (default 5000Hz)
| freq | Optional motor timer frequency (default 5000 Hz) |