verander website naar self
This commit is contained in:
11
dht11.py
11
dht11.py
@@ -9,8 +9,6 @@ sensor = adafruit_dht.DHT11(board.D6)
|
||||
LED_PIN = 21
|
||||
FAN_PIN = 22
|
||||
|
||||
website = http.server.BaseHTTPRequestHandler
|
||||
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setup(LED_PIN, GPIO.OUT)
|
||||
GPIO.setup(FAN_PIN, GPIO.OUT)
|
||||
@@ -31,10 +29,11 @@ def check_data():
|
||||
GPIO.output(FAN_PIN, GPIO.LOW)
|
||||
|
||||
class handler_class(http.server.BaseHTTPRequestHandler):
|
||||
if website.path == '/':
|
||||
website.send_response(200)
|
||||
website.send_header('Content-type', 'text/html; charset=utf-8')
|
||||
website.wfile.write ("<html><head><title>gedoe</title></head><body><h1>hallo</h1><hr><p>hallo</p></body></html>")
|
||||
def do_WEB (self):
|
||||
if self.path == '/':
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', 'text/html; charset=utf-8')
|
||||
self.wfile.write ("<html><head><title>gedoe</title></head><body><h1>hallo</h1><hr><p>hallo</p></body></html>")
|
||||
|
||||
|
||||
def web_server():
|
||||
|
||||
Reference in New Issue
Block a user