From bd0a388682dae9da9146a9d37ebfd4d2c2527b6e Mon Sep 17 00:00:00 2001 From: Robert Scheibe Date: Sun, 22 Dec 2024 15:52:40 +0100 Subject: added history.html and cpu temperature plotting --- water_the_plant | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 water_the_plant (limited to 'water_the_plant') diff --git a/water_the_plant b/water_the_plant new file mode 100755 index 0000000..bdfed4d --- /dev/null +++ b/water_the_plant @@ -0,0 +1,22 @@ +#!/usr/bin/python3 +import RPi.GPIO as GPIO +import time + +# GPIO-Modus auf BCM setzen +GPIO.setmode(GPIO.BCM) + +# GPIO4 als Ausgang konfigurieren +GPIO.setup(4, GPIO.OUT) + +try: + # GPIO4 einschalten + GPIO.output(4, GPIO.LOW) + # 1 Sekunde warten + time.sleep(4) + # GPIO4 ausschalten + GPIO.output(4, GPIO.HIGH) +finally: + # Ressourcen freigeben + GPIO.cleanup() + + -- cgit v1.2.3