How to Create a personal weather station using RPI Sense hat
TechBytes with Ron Nutter
Would you like to have the RPI tell you more about your house? Need to know about barometric pressure or humidity? Stay tuned and I will show you how to use your RPI and the Sense hat to get this information
sudo apt-get update sudo apt-get upgrade sudo apt-get install python3-flask sudo apt-get install sense-hat nano weather.py from flask import Flask, render_template from sense_hat import SenseHat
app = Flask(name) @app.route('/') def index(): sense = SenseHat() celcius = round(sense.get_temperature(), 1) fahrenheit = round(1.8 * celcius + 32, 1) return render_template('weather.html', celcius=celcius, fahrenheit=fahrenheit) if name == 'main': app.run(debug=True, host='0.0.0.0') Ctrl x to save file mkdir templates nano templates/weather.html
**** Due to limitations on YouTube with having files with the greater than/less than symbols, **** please go to my website techbyteswithronnutter.com for the full text files used.
! Install screen command to allow you to detach and still be running sudo apt-get install screen
! Start a screen session that you can disconnect from screen bash
! Reconnect to screen when you reconnect to rpi screen -r
!Sense hat temperature discussion https://www.raspberrypi.org/forums/viewtopic.php?t=152498 https://www.techybugz.com/tech/raspberry-pi-weather-station/#/?playlistId=0&videoId=0
⏱️TIMESTAMPS⏱️ 0:00 - Intro 0:50 - What we will be covering 1:44 - Creating the SD card to run on 3:43 - Updating RPI OS 5:00 - Installing Sense Hat software 5:35 - Configuring Sense Hat software 10:30 - Heat sink case for Sense Hat 16:03 - testing final configuration
================================================ *** Show Notes, Links and Resources **** Here are the items mentioned in this video -
RPI 2GB CanaKit Raspberry Pi 4 Basic Kit (2GB RAM) https://amzn.to/3vLHqjo
CanaKit Raspberry Pi 4 4GB Basic Kit with PiSwitch (4GB RAM) https://amzn.to/3eWsDMR
Raspberry Pi Sense HAT https://amzn.to/3v6yd3J
Geekworm Raspberry Pi 4 Case, Raspberry Pi 4 Model B CNC Ultra-Thin Aluminum Alloy Metal Passive Cooling Case https://amzn.to/32q9awx
Click on this link to get the SmartHome Account Creation Checklist
➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥ Never miss a video about creating your own smart home Subscribe ⇢ http://ronaldnutter.com/subscribe
To listen to an audio version of this episode while driving, TechBytes with Ron Nutter is available on iTunes, Google Podcasts, Stitcher and TuneIn. Go to TechByteswithRonNutter.com to subscribe today!
To subscribe to the TechbytesRN newsletter, click here - http://ronaldnutter.com/sample1 In return for subscribing to the newsletter, I will send you a chapter from my first DIY Smart Home Guide Boo ... https://www.youtube.com/watch?v=O0hQjHsl814
203946142 Bytes