|
- #!/usr/bin/env python3
-
- from time import sleep
- import threading
-
- import aufgabe_b
-
- try:
- import RPi.GPIO as GPIO
- except RuntimeError:
- print("Error importing RPi.GPIO! Run this script as root.")
- exit(1)
-
- def setup():
- # Run GPIO with PI pin numbers.
- GPIO.setmode(GPIO.BCM)
-
- def main():
- setup()
-
- # Pin, frequency in Hz
- led_thread1 = LED(17, 1000, use_pwm=True)
- led_thread1.run()
-
- if __name__ == "__main__":
- main()
|