Lautsprecher.py 228 B

123456789101112
  1. import time
  2. import Adafruit_BBIO.PWM as PWM
  3. myPWM = "P8_13"
  4. try:
  5. time.sleep(2)
  6. while True:
  7. PWM.start(myPWM, 50, 10000)
  8. time.sleep(1)
  9. PWM.stop(myPWM)
  10. print("...")
  11. except:
  12. PWM.cleanup()