updated classname to avoid collisions with gpiozero

This commit is contained in:
Andreas Jönsson 2025-05-07 15:02:48 +02:00
parent 8dc6be6cfc
commit 328b03a76f
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@
from gpiozero import Motor, PWMOutputDevice from gpiozero import Motor, PWMOutputDevice
class Motor: class TMotor:
def __init__(self, motor_pin1, motor_pin2, pwm_pin): def __init__(self, motor_pin1, motor_pin2, pwm_pin):
pass pass

View File

@ -2,12 +2,12 @@
# This file contains the main code to control the robot. # This file contains the main code to control the robot.
# #
#################################################################### ####################################################################
from motors import Motor from motors import TMotor
def main(): def main():
leftMotor = Motor(17, 18, 22) leftMotor = TMotor(17, 18, 22)
rightMotor = Motor(23, 24, 25) rightMotor = TMotor(23, 24, 25)
while True: while True:
# Move forward # Move forward