mirror of
https://github.com/kevinveenbirkenbach/erinaco.git
synced 2025-09-09 11:47:14 +02:00
GPIO-Mapping angepasst und allgemeine Aenderungen
This commit is contained in:
@@ -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();
|
||||
|
@@ -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