-
Notifications
You must be signed in to change notification settings - Fork 1
/
MotorKontrol.py
38 lines (33 loc) · 1.12 KB
/
MotorKontrol.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import RPi.GPIO as GPIO
import time
def ileri():
GPIO.output("""solMotorGeri""",GPIO.LOW)
GPIO.output("""solMotorİleri""",GPIO.HIGH)
GPIO.output("""sagMotorGeri""",GPIO.LOW)
GPIO.output("""sagMotorİleri""",GPIO.HIGH)
def geri():
GPIO.output("""solMotorGeri""",GPIO.HIGH)
GPIO.output("""solMotorİleri""",GPIO.LOW)
GPIO.output("""sagMotorGeri""",GPIO.HIGH)
GPIO.output("""sagMotorİleri""",GPIO.LOW)
def sag():
GPIO.output("""solMotorGeri""",GPIO.LOW)
GPIO.output("""solMotorİleri""",GPIO.HIGH)
GPIO.output("""sagMotorGeri""",GPIO.HIGH)
GPIO.output("""sagMotorİleri""",GPIO.LOW)
def sol():
GPIO.output("""solMotorGeri""",GPIO.HIGH)
GPIO.output("""solMotorİleri""",GPIO.LOW)
GPIO.output("""sagMotorGeri""",GPIO.LOW)
GPIO.output("""sagMotorİleri""",GPIO.HIGH)
def dur():
GPIO.output("""solMotorGeri""",GPIO.LOW)
GPIO.output("""solMotorİleri""",GPIO.LOW)
GPIO.output("""sagMotorGeri""",GPIO.LOW)
GPIO.output("""sagMotorİleri""",GPIO.LOW)
def geri_don():
dur()
time.sleep(1)
sag()
time.sleep(0.8)
dur()