diff --git a/dht11.py b/dht11.py index 7b3941b..dc0ec85 100644 --- a/dht11.py +++ b/dht11.py @@ -2,6 +2,7 @@ import time import adafruit_dht import board import RPi.GPIO as GPIO +import http.server sensor = adafruit_dht.DHT11(board.D6) LED_PIN = 21 @@ -24,4 +25,7 @@ while True: else: GPIO.output(LED_PIN, GPIO.LOW) GPIO.output(FAN_PIN, GPIO.LOW) - time.sleep(2.0) \ No newline at end of file + web_binding = ('', 8000) + server = http.server.HTTPServer(web_binding) + print ("server draait") + server.serve_forever()