15 lines
297 B
Python
Executable File
15 lines
297 B
Python
Executable File
import board
|
|
import pwmio
|
|
|
|
motor_A1 = pwmio.PWMOut(board.GP17)
|
|
motor_A2 = pwmio.PWMOut(board.GP16)
|
|
motor_B1 = pwmio.PWMOut(board.GP18)
|
|
motor_B2 = pwmio.PWMOut(board.GP19)
|
|
|
|
|
|
def stop():
|
|
motor_A1.duty_cycle = 0
|
|
motor_A2.duty_cycle = 0
|
|
motor_B1.duty_cycle = 0
|
|
motor_B2.duty_cycle = 0
|