Lucas Murray ME 305 Portfolio
Classes | Variables
motor.py File Reference

A driver to change the duty cycle of a connected motor. More...

Classes

class  motor.Motor
 A motor class for one channel of a driver object. More...
 

Variables

 motor.PWM_tim = Timer(3, freq = 20_000)
 
 motor.nFault = Pin(Pin.cpu.B2)
 
 motor.pinB4 = Pin(Pin.cpu.B4, Pin.OUT_PP)
 
 motor.pinB5 = Pin(Pin.cpu.B5, Pin.OUT_PP)
 
 motor.pinB0 = Pin(Pin.cpu.B0, Pin.OUT_PP)
 
 motor.pinB1 = Pin(Pin.cpu.B1, Pin.OUT_PP)
 
 motor.motor1 = Motor(PWM_tim, pinB4, pinB5, 1, 2)
 
 motor.motor2 = Motor(PWM_tim, pinB0, pinB1, 3, 4)
 
 motor.nSleep = Pin(Pin.cpu.A15, mode=Pin.OUT_PP)
 

Detailed Description

A driver to change the duty cycle of a connected motor.

The motor class instantiates a simple motor that will connect to a motor connected to the pin and channel arguments. This class allows for the changing of the motor's duty cycle.


Source Code: https://bitbucket.org/lmurray03/me305_lucas_murray/src/master/Lab%200x03/motor.py

Author
Lucas Murray
Max Cassady
Date
February 16, 2022