From 18fe7a6d810ff5e880f4b2bb1d806e4691e65f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rnR?= Date: Sat, 13 May 2023 10:56:29 +0200 Subject: [PATCH] led blink example in Python3 --- testled.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 testled.py diff --git a/testled.py b/testled.py new file mode 100755 index 0000000..f2d8bd1 --- /dev/null +++ b/testled.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import RPi.GPIO as GPIO +from time import sleep +GPIO.setwarnings(False) + +GPIO.setmode(GPIO.BCM) +GPIO.setup(17, GPIO.OUT) + +while True: + GPIO.output(17, True) + print ("lampe an") + sleep(1) + GPIO.output(17, False) + print ("lampe aus") + sleep(1)