erinaco/test/gpio_test.py

10 lines
184 B
Python
Raw Normal View History

2017-04-14 15:32:01 +02:00
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();