Skip to content

Instantly share code, notes, and snippets.

@Bhavithiran97
Created February 5, 2021 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bhavithiran97/8e2bdb61e05f10acfe81f96e9d96e03f to your computer and use it in GitHub Desktop.
Save Bhavithiran97/8e2bdb61e05f10acfe81f96e9d96e03f to your computer and use it in GitHub Desktop.
Brake
from motor_driver import * # import motor_driver library
import utime
motor = motor_driver(4,5,2,3) # M1A = 4, M1B = 5, M2A = 2, M2B = 3
# Move Forward then brake
motor.speed(50,50) # move forward at speed 50
utime.sleep(1) # sleep 1 second
motor.brake() # stop the motor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment