evenjc

Untitled

Sep 29th, 2020 (edited)
1,191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. from flask import Flask, render_template
  2.  
  3. app = Flask(__name__)
  4.  
  5. from sense_hat import SenseHat
  6.  
  7. senseHat = SenseHat()
  8.  
  9. @app.route('/')
  10. def index_page():
  11.     humidity = senseHat.get_humidity()
  12.     return render_template('html/template.html', humidity=humidity)
Advertisement
Add Comment
Please, Sign In to add comment