예제 #1
0
파일: MyHandler.py 프로젝트: jitto/pi-rover
def initMotor():
    GPIO.setFunction(17, GPIO.PWM)
    GPIO.setFunction(22, GPIO.PWM)
    GPIO.setFunction(23, GPIO.PWM)
    GPIO.setFunction(24, GPIO.PWM)
    motorTurn(0.2, 0, 0.2, 0)
    time.sleep(.1)
    motorTurn(0, 0, 0, 0)
예제 #2
0
파일: MyHandler.py 프로젝트: jitto/pi-rover
def motorTurn(right1, right2, left1, left2):
    GPIO.pulseRatio(17, right1)
    GPIO.pulseRatio(22, right2)
    GPIO.pulseRatio(23, left1)
    GPIO.pulseRatio(24, left2)