19 lines
388 B
Python
19 lines
388 B
Python
#!/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)
|