Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney...
Transcript of Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney...
![Page 1: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/1.jpg)
Pi in the Sky
(Scripts for Web Interface)
Whitney Nelson
Hampton University
SiParcs
Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar
![Page 2: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/2.jpg)
Objective
- Use a Weather Pi
to upload data
- Store data using
cloud storage
- Query and display
data onto an
interface
2
![Page 3: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/3.jpg)
Overview of Raspberry Pi
- Raspberry Pi 2
Model B ($35)
- Single board
computer
running at 900
MHz
- Linux based
operating system
HDMI Port
Ethernet Port
GPIO Pins
Quad
USB
ports
Micro USB
3
![Page 4: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/4.jpg)
Personal Objective
• View data that has been uploaded from
the sensors
• Allow client to interact with the server
• Display data in tables and graphs
• Handle any missing values in case of
error in the sensors
4
![Page 5: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/5.jpg)
Sensors
Built in Sensors e.g.
Temperature and Pressure
Python scripts read
data from Weather Pi
Weather Pi connects to Raspberry
Pi through GPIO pins
Weather Pi Raspberry Pi
5
![Page 6: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/6.jpg)
Cloud
• Owncloud 7.0.1- self
hosted share server
• Remotely stores data
that were uploaded
from the sensors
• Information can be
acccessed by any
Raspberry Pi within
storage cluster
6
![Page 7: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/7.jpg)
My Role in the Project
Temperature
Pressure
Altitude
Humidity
Wind Speed
7
![Page 8: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/8.jpg)
MYSQL
• Send data from cloud
to the database
• Organize data into
tables
• Index through the data
to be extracted from
database to display
onto a webpage
Server request database
for information
8
Client makes
request
![Page 9: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/9.jpg)
Why PHP and HTML?
Hypertext Markup Language (HTML5)
• Works on client side
• Language that describes and
displays browsers
• Users sends HTML code
Hypertext Preprocessor (PHP5)
• Works on server side
• Intelligent programming
language
• PHP processes HTML code
9
![Page 10: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/10.jpg)
User makes web page request 10
![Page 11: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/11.jpg)
1. Connect to the database
11
![Page 12: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/12.jpg)
2. Query the database
12
![Page 13: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/13.jpg)
3. Display data in tables
13
![Page 14: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/14.jpg)
Web Interface 14
![Page 15: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/15.jpg)
Updating graphics and error
handling
• JpGraph: tool for graphing data
• Display graphs for current time and date
• Queries that were made for tables can also be used
for graphs
• Missing values in database are replaced with nearest
value
15
![Page 16: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/16.jpg)
Image Credits
• http://cdn.xenlife.com.au/wp-
content/uploads/nuvem.jpg
• http://www.wpclipart.com/computer/PCs/more_c
omputers/computer_thin_client.png
• https://s3.amazonaws.com/otreva-cdn-3/wp-
content/uploads/2013/12/mysql-logo.jpg
• http://imgsdown.1mobile.com/group3/M00/0C/A
B/S34UR1S8jTWAYQ29AABfnKh2CHs607.png
16
![Page 17: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/17.jpg)
Acknowledgments
• Dr. Richard Loft
• Raghu Raj Prasanna Kumar
• Rashmi Oak
• Harish Ramachandran
• Priyanka Sanghavi
• Amogh Simha
• Ian Bragg
• Gaston Seneza
• Jenish Koirala
17
![Page 18: Pi in the Sky (Scripts for Web Interface) · Pi in the Sky (Scripts for Web Interface) Whitney Nelson Hampton University SiParcs Mentors: Dr. Richard Loft and Raghu Raj Prasanna Kumar](https://reader030.fdocuments.net/reader030/viewer/2022033122/5e9d289fd9db191ef864b43e/html5/thumbnails/18.jpg)
QUESTIONS???
18