外接直流馬達
-
import time, RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(8, GPIO.OUT) GPIO.setup(10, GPIO.OUT) GPIO.output(8,True) #left back GPIO.output(10,False) #left front time.sleep(5) GPIO.output(8,False) #left back GPIO.output(10,True) #left front time.sleep(5) GPIO.cleanup()
-