diff --git a/lib/L298N.py b/lib/L298N.py index e7b63ab..f857974 100644 --- a/lib/L298N.py +++ b/lib/L298N.py @@ -1,6 +1,6 @@ #Driver for the l298n Dual HBridge motor controller. -from PWM import PWM +from pwm import pwm from pyb import Pin, delay class motor( ): @@ -16,7 +16,7 @@ class motor( ): m2 = motor('Y5', 'Y6', ('Y4', 4)) """ self._forward = Pin(forward, Pin.OUT_PP) self._backward = Pin(backward, Pin.OUT_PP) - self._speedControl = PWM(speed[0], speed[1]) + self._speedControl = pwm(speed[0], speed[1]) self._speed = 0 @property diff --git a/lib/PWM.py b/lib/PWM.py index 6a0b87c..3482060 100644 --- a/lib/PWM.py +++ b/lib/PWM.py @@ -36,7 +36,7 @@ class pwm(object): @staticmethod def timerandchannel( pinname, timernum ) : try: - a = PWM.PinChannels[pinname] + a = pwm.PinChannels[pinname] if timernum <= 0: return a[0] else: