Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import time
from w1thermsensor import W1ThermSensor
from flask import Flask
app = Flask(__name__)
def Temperature():
sensor = W1ThermSensor()
temperature = sensor.get_temperature()
return temperature
def WebpageSet():
W = Open("index.html", "w")
W.write("<HTML><head> <meta name="viewport" content="width=device-width, initial-scale=1"><Title> Godiva Weather Station (B5) </Title><!DOCTYPE html><meta name="viewport" content="width=device-width, initial-scale=1"><style>body, html { height: 100%; margin: 0;}.bg { /* The image used */ background-image: url("Godiva.jpg"); /* Full height */ height: 100%; /* Center and scale the image nicely */ background-position: center; background-repeat: no-repeat; background-size: cover;}.centered { position: fixed; top: 50%; left: 50%; margin-top: -50px; margin-left: -40px;}</style></head><body><div class="bg"><H3> <Center> ____________________ </H3><H1> <Center> Godiva Weather Station </H1><H3> <Center> Located in Block 5 </Center> </H3><div class="centered"> <font size=100> <H1>
@app.route("/")
def index():
return "index.html"
if __name__ == '__main__':
app.run(threaded=True)