This class implements a motor driver for the ME 305 Nucleo board.
More...
|
| nSLEEP_pin |
| A pyb.Pin object to use as the enable pin.
|
|
| IN1_pin |
| A pyb.Pin object to use as the input to half bridge 1.
|
|
| IN2_pin |
| A pyb.Pin object to use as the input to half bridge 2.
|
|
| timer |
| A pyb.Timer object to use for PWM generation on 17IN1_pin and IN2_pin.
|
|
| TIM |
| timer object with timer object
|
|
| IN1 |
| Connect Motor's pin 1 with timer channel.
|
|
| IN2 |
| Connect Motor's pin 2 with timer channel.
|
|
| EN |
| object to power the pins on or off
|
|
This class implements a motor driver for the ME 305 Nucleo board.
◆ __init__()
def motor.MotorDriver.__init__ |
( |
|
self, |
|
|
|
nSLEEP_pin, |
|
|
|
IN1_pin, |
|
|
|
IN2_pin, |
|
|
|
timer |
|
) |
| |
Creates a motor driver by initializing GPIO pins and turning the motor off for safety.
- Parameters
-
nSLEEP_pin | A pyb.Pin object to use as the enable pin. |
IN1_pin | A pyb.Pin object to use as the input to half bridge 1. |
IN2_pin | A pyb.Pin object to use as the input to half bridge 2. |
timer | A pyb.Timer object to use for PWM generation on 17IN1_pin and IN2_pin. |
The documentation for this class was generated from the following file: