We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1b9acb commit b1c7b6aCopy full SHA for b1c7b6a
test/gpio21_bcm.py
@@ -0,0 +1,22 @@
1
+#!/usr/bin/python3
2
+import RPi.GPIO as GPIO
3
+import time
4
+
5
6
+led = 21
7
+stime = 0.5
8
9
+GPIO.setmode(GPIO.BCM)
10
11
+print("GPIO.setup led ")
12
+GPIO.setup(led, GPIO.OUT)
13
14
15
+while True:
16
+ GPIO.output(led, True)
17
+ print('led on ')
18
+ time.sleep(stime)
19
+ GPIO.output(led, False)
20
+ print('led off ')
21
22
test/gpio21_bcm_gpiozero.py
@@ -0,0 +1,12 @@
+#from gpiozero.pins.rpigpio import RPiGPIOPin
+from gpiozero import LED
+from time import sleep
+led = LED(21)
+ led.on()
+ sleep(1)
+ led.off()
0 commit comments