This commit is contained in:
phm3
2019-02-01 15:00:51 +00:00
commit d44c021767
8 changed files with 1508 additions and 0 deletions

18
UI/main.py Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/python
import bdsensors
import bmp180
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def main():
templateData = {'temperature': bdsensors.read_temp(),
'pressure': bmp180.readings()}
return render_template('main.html', **templateData)
if __name__ == "__main__":
app.run(host='0.0.0.0', port=80, debug=True)