Classes | |
class | MotorDriver.MotorDriver |
A motor driver object. More... | |
Namespaces | |
MotorDriver | |
The motor driver was built connecting a X-NUCLEO-IHM04A1 motor driver platform and a NUCLEO-L476RG. The motor was connected to the A ports in the IHM04A1 along with connecting a 12V power source to port B. The program was coded in python and uses Thonny to interact between the code and the microcontroller.
The user will be responsible for designating and defining the pins (EN, IN1, and IN2), designating the timer channel, and designating a frequency. The example in the main portion of this code gives an example of how to implement these designations. After connecting the motors to the correct ports and defining the module with the "MotorDriver" class, the user can then activate or deactivate the motor by using the enable and disable methods as well as set a pulse width module (PWM) value for the motor.