Ras Pi motor test

 So I've connected up a Ras pi.. think it's a 3? Connected by ssh to my mac. Written a short motor test loop, all works ok, so I've written a bunch of functions for each of the directions the mecanum wheels can run.



import time

from adafruit_motorkit import MotorKit


kit = MotorKit()


try:

        while 1:

                kit.motor1.throttle = 1

                time.sleep(1)

                kit.motor1.throttle = 0

                time.sleep(2)

                

                kit.motor1.throttle = -1

                time.sleep(1)

                kit.motor1.throttle = 0

                time.sleep(2)


except KeyboardInterrupt:

        kit.motor1.throttle = 0

        pass




Comments