Arbeitsversion von Teil 14.

This commit is contained in:
2023-04-25 13:27:20 +02:00
parent c8ea31042e
commit acc0f965ff
3 changed files with 28 additions and 1 deletions

View File

@@ -17,5 +17,7 @@ CC-BY-SA Olli Graf
|10 | Dateien| |10 | Dateien|
|11 | Datum und Zeit| |11 | Datum und Zeit|
|12 | Multithreading| |12 | Multithreading|
|12 | Netzwerk| |13 | Netzwerk|
|14 | GPIO|
|15 | Testing|

2
teil14/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
./__pycache__
./network/__pycache__/*

23
teil14/led.py Executable file
View File

@@ -0,0 +1,23 @@
#! /usr/bin/python3
import RPi.GPIO as GPIO
from time import sleep
__PIN__ = 18
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(__PIN__,GPIO.OUT)
while True:
GPIO.output(__PIN__,GPIO.HIGH)
print('LED ein')
sleep(0.5)
GPIO.output(__PIN__,GPIO.LOW)
print('LED aus')