Phyton script zum steuern der selbst gebauten pdu.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

gpio_test.py 2.9 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. GPIO.setup(12, GPIO.OUT)
  13. GPIO.setup(16, GPIO.OUT)
  14. GPIO.setup(20, GPIO.OUT)
  15. GPIO.setup(21, GPIO.OUT)
  16. GPIO.setup(2, GPIO.OUT)
  17. GPIO.setup(3, GPIO.OUT)
  18. GPIO.setup(4, GPIO.OUT)
  19. GPIO.setup(17, GPIO.OUT)
  20. GPIO.setup(27, GPIO.OUT)
  21. GPIO.setup(22, GPIO.OUT)
  22. GPIO.setup(10, GPIO.OUT)
  23. GPIO.setup(9, GPIO.OUT)
  24. GPIO.setup(11, GPIO.OUT)
  25. GPIO.setup(5, GPIO.OUT)
  26. GPIO.setup(6, GPIO.OUT)
  27. GPIO.setup(13, GPIO.OUT)
  28. for i in range(1):
  29. GPIO.output(14, GPIO.HIGH)
  30. time.sleep(1)
  31. GPIO.output(15, GPIO.HIGH)
  32. time.sleep(1)
  33. GPIO.output(18, GPIO.HIGH)
  34. time.sleep(1)
  35. GPIO.output(23, GPIO.HIGH)
  36. time.sleep(1)
  37. GPIO.output(24, GPIO.HIGH)
  38. time.sleep(1)
  39. GPIO.output(25, GPIO.HIGH)
  40. time.sleep(1)
  41. GPIO.output(8, GPIO.HIGH)
  42. time.sleep(1)
  43. GPIO.output(7, GPIO.HIGH)
  44. time.sleep(1)
  45. GPIO.output(12, GPIO.HIGH)
  46. time.sleep(1)
  47. GPIO.output(16, GPIO.HIGH)
  48. time.sleep(1)
  49. GPIO.output(20, GPIO.HIGH)
  50. time.sleep(1)
  51. GPIO.output(21, GPIO.HIGH)
  52. time.sleep(1)
  53. GPIO.output(2, GPIO.HIGH)
  54. time.sleep(1)
  55. GPIO.output(3, GPIO.HIGH)
  56. time.sleep(1)
  57. GPIO.output(4, GPIO.HIGH)
  58. time.sleep(1)
  59. GPIO.output(17, GPIO.HIGH)
  60. time.sleep(1)
  61. GPIO.output(27, GPIO.HIGH)
  62. time.sleep(1)
  63. GPIO.output(22, GPIO.HIGH)
  64. time.sleep(1)
  65. GPIO.output(10, GPIO.HIGH)
  66. time.sleep(1)
  67. GPIO.output(9, GPIO.HIGH)
  68. time.sleep(1)
  69. GPIO.output(11, GPIO.HIGH)
  70. time.sleep(1)
  71. GPIO.output(5, GPIO.HIGH)
  72. time.sleep(1)
  73. GPIO.output(6, GPIO.HIGH)
  74. time.sleep(1)
  75. GPIO.output(13, GPIO.HIGH)
  76. time.sleep(1)
  77. GPIO.output(14, GPIO.LOW)
  78. time.sleep(1)
  79. GPIO.output(15, GPIO.LOW)
  80. time.sleep(1)
  81. GPIO.output(18, GPIO.LOW)
  82. time.sleep(1)
  83. GPIO.output(23, GPIO.LOW)
  84. time.sleep(1)
  85. GPIO.output(24, GPIO.LOW)
  86. time.sleep(1)
  87. GPIO.output(25, GPIO.LOW)
  88. time.sleep(1)
  89. GPIO.output(8, GPIO.LOW)
  90. time.sleep(1)
  91. GPIO.output(7, GPIO.LOW)
  92. time.sleep(1)
  93. GPIO.output(12, GPIO.LOW)
  94. time.sleep(1)
  95. GPIO.output(16, GPIO.LOW)
  96. time.sleep(1)
  97. GPIO.output(20, GPIO.LOW)
  98. time.sleep(1)
  99. GPIO.output(21, GPIO.LOW)
  100. time.sleep(1)
  101. GPIO.output(2, GPIO.LOW)
  102. time.sleep(1)
  103. GPIO.output(3, GPIO.LOW)
  104. time.sleep(1)
  105. GPIO.output(4, GPIO.LOW)
  106. time.sleep(1)
  107. GPIO.output(17, GPIO.LOW)
  108. time.sleep(1)
  109. GPIO.output(27, GPIO.LOW)
  110. time.sleep(1)
  111. GPIO.output(22, GPIO.LOW)
  112. time.sleep(1)
  113. GPIO.output(10, GPIO.LOW)
  114. time.sleep(1)
  115. GPIO.output(9, GPIO.LOW)
  116. time.sleep(1)
  117. GPIO.output(11, GPIO.LOW)
  118. time.sleep(1)
  119. GPIO.output(5, GPIO.LOW)
  120. time.sleep(1)
  121. GPIO.output(6, GPIO.LOW)
  122. time.sleep(1)
  123. GPIO.output(13, GPIO.LOW)