Update bsp.py

master
zen 4 years ago
parent 7711aa6459
commit 12e2b1c8d9
  1. 3
      bsp.py

@ -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)

Loading…
Cancel
Save