init
This commit is contained in:
18
UI/main.py
Normal file
18
UI/main.py
Normal 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)
|
Reference in New Issue
Block a user