Phyton script zum steuern der selbst gebauten pdu.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

58 satır
1.0 KiB

  1. import RPi.GPIO as GPIO
  2. import time
  3. GPIO.setmode(GPIO.BCM)
  4. GPIO.setup(14, GPIO.OUT)
  5. GPIO.setup(15, GPIO.OUT)
  6. GPIO.setup(18, GPIO.OUT)
  7. GPIO.setup(23, GPIO.OUT)
  8. GPIO.setup(24, GPIO.OUT)
  9. GPIO.setup(25, GPIO.OUT)
  10. GPIO.setup(8, GPIO.OUT)
  11. GPIO.setup(7, GPIO.OUT)
  12. for i in range(5):
  13. GPIO.output(14, GPIO.HIGH)
  14. time.sleep(1)
  15. GPIO.output(15, GPIO.HIGH)
  16. time.sleep(1)
  17. GPIO.output(18, GPIO.HIGH)
  18. time.sleep(1)
  19. GPIO.output(23, GPIO.HIGH)
  20. time.sleep(1)
  21. GPIO.output(24, GPIO.HIGH)
  22. time.sleep(1)
  23. GPIO.output(25, GPIO.HIGH)
  24. time.sleep(1)
  25. GPIO.output(8, GPIO.HIGH)
  26. time.sleep(1)
  27. GPIO.output(7, GPIO.HIGH)
  28. time.sleep(1)
  29. GPIO.output(14, GPIO.LOW)
  30. time.sleep(1)
  31. GPIO.output(15, GPIO.LOW)
  32. time.sleep(1)
  33. GPIO.output(18, GPIO.LOW)
  34. time.sleep(1)
  35. GPIO.output(23, GPIO.LOW)
  36. time.sleep(1)
  37. GPIO.output(24, GPIO.LOW)
  38. time.sleep(1)
  39. GPIO.output(25, GPIO.LOW)
  40. time.sleep(1)
  41. GPIO.output(8, GPIO.LOW)
  42. time.sleep(1)
  43. GPIO.output(7, GPIO.LOW)