Commit 100f617f authored by Kristian Tan's avatar Kristian Tan

Revert "Added css file"

This reverts commit cb396c02.
parent 4aa63d3c
...@@ -34,6 +34,8 @@ def main(): ...@@ -34,6 +34,8 @@ def main():
def action(change_pin): def action(change_pin):
change_pin = int(change_pin) change_pin = int(change_pin)
device_name = pins[change_pin]['name'] device_name = pins[change_pin]['name']
print("Input value before change: " + str(GPIO.input(change_pin)))
# if action == "on": # if action == "on":
# GPIO.output(change_pin, GPIO.HIGH) # GPIO.output(change_pin, GPIO.HIGH)
# message = "Turned " + device_name + " on." # message = "Turned " + device_name + " on."
...@@ -45,12 +47,13 @@ def action(change_pin): ...@@ -45,12 +47,13 @@ def action(change_pin):
message = "Turned " + device_name message = "Turned " + device_name
if GPIO.input(change_pin) == 0: if GPIO.input(change_pin) == 0:
message += " off." message += "off."
else: else:
message += " on." message += "on."
for pin in pins: for pin in pins:
pins[pin]['state'] = GPIO.input(pin) pins[pin]['state'] = GPIO.input(pin)
print("Input value after change: " + str(GPIO.input(change_pin)))
template_data = { template_data = {
'message': message, 'message': message,
......
body {
background-color: aqua;
}
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<head> <head>
<title>Lighting control & Smart meter</title> <title>Current Status</title>
<link rel="stylesheet" href="{{ url_for('static', filename='/main.css') }}">
</head> </head>
<body> <body>
<h1>Attached devices</h1> <h1>Device Listing and Status</h1>
{% for pin in pins %} {% for pin in pins %}
<p>The {{ pins[pin].name }} <p>The {{ pins[pin].name }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment