mirror of
https://github.com/kevinveenbirkenbach/erinaco.git
synced 2026-11-05 12:27:43 +00:00
GPIO-Mapping angepasst und allgemeine Aenderungen
This commit is contained in:
1 parent
0a8b3577bb
commit
88f0075735
3 files changed
+32
-11
No files matched your search
@@ -1,9 +0,0 @@
|
||||
import RPi.GPIO as GPIO
|
||||
GPIO.setmode(GPIO.BCM);
|
||||
pin=0;
|
||||
while pin<=40:
|
||||
GPIO.setup(pin, GPIO.IN);
|
||||
print("Pin {0}; Value {1};".format(pin,GPIO.input(pin)));
|
||||
pin += 1;
|
||||
GPIO.cleanup();
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
|
||||
SENSOR_PIN = 22
|
||||
SENSOR_PIN = 19
|
||||
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setup(SENSOR_PIN, GPIO.IN)
|
||||
@@ -14,7 +14,7 @@ try:
|
||||
GPIO.add_event_detect(SENSOR_PIN , GPIO.RISING,
|
||||
callback=mein_callback)
|
||||
while True:
|
||||
time.sleep(100)
|
||||
time.sleep(1)
|
||||
except KeyboardInterrupt:
|
||||
print("Beende...")
|
||||
GPIO.cleanup()
|
||||
Reference in new issue
Block a user