|
|
@ -94,6 +94,7 @@ class motor (): |
|
|
|
class beep(): |
|
|
|
class beep(): |
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
self.BUZ = 4 |
|
|
|
self.BUZ = 4 |
|
|
|
|
|
|
|
GPIO.setmode(GPIO.BCM) |
|
|
|
GPIO.setup(self.BUZ, GPIO.OUT) |
|
|
|
GPIO.setup(self.BUZ, GPIO.OUT) |
|
|
|
|
|
|
|
|
|
|
|
def on(self): |
|
|
|
def on(self): |
|
|
@ -419,4 +420,4 @@ if __name__ == '__main__': |
|
|
|
l = line_sensor() |
|
|
|
l = line_sensor() |
|
|
|
while True: |
|
|
|
while True: |
|
|
|
print(l.AnalogRead()) |
|
|
|
print(l.AnalogRead()) |
|
|
|
time.sleep(0.2) |
|
|
|
time.sleep(0.2) |
|
|
|