evenjc

Untitled

Sep 29th, 2020 (edited)
813
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data