SlideShare a Scribd company logo
Khalil Abdul-Fattah IT499
 Set up Raspberry Pi with all necessary software
components for a LAMP server
 LAMP = Linux/Apache/MySQL/PHP, Perl
 Wired temperature/humidity sensor to Pi,
acquire and display readings from my bedroom
 Worked primarily via terminal and Emacs/Vim
text editors
 Got it fully up and running online so that it’s
accessible from outside of LAN
 Attempted to keep budget low ($100 max)
 Raspberry Pi Model B+ (2014 model)
 700MHz CPU (overclocked to 800MHz)
 512MB SDRAM
 Ports: HDMI, 4xUSB 2.0, Ethernet, Micro
USB power socket
 8GB pre-installed microSD card for storage
and Raspbian OS
 40-pin GPIO connector
 Extra peripherals including case and HDMI
cable
 Total package = ~$60
 AM2302 wired temperature-humidity
sensor
 3 to 5V power
 Reads humidity from 0 to 100% with 2 to
5% margin of error
 Reads temperature from -40 to 80 degrees
Celsius with +-0.5 degrees C margin of error
 Cost = $15
 PoEAdapter
 Provides power over Ethernet conversion
 Potentially allows for greater mobility (don’t need to
plug into power outlet)
 Electrical wiring woes
 Out $20…
 …But unintentionally worked as a barrier between Pi
and sensor to block electrical interference!
 Wi-Fi networking
 Would have allowed further mobility
 UnstableWi-Fi environment at home
 Raspberry Pi camera add-on
 To capture still images of Pi location, just for fun
 Wouldn’t fit properly with case
 Budget was climbing
 Considered building multiple units to
monitor/compare two or more locations at once
 Too time consuming and costly
 Had to solder sensor wires
to proper GPIO (General
Purpose Input/Output) pins
 Red to pin 1 (power)
 Yellow to pin 7 (data)
 Black to pin 9 (grounding)
 Maybe trickiest part of
project (wires are thin and
easy to burn through)
 GPIO pins not enabled by
default
 Must be turned on by
modifying code in wiringPi C
program
 Apache PiWeb server initially
LAN only; single mostly blank
Web page
 Created MySQL database,
“Monitor”
 Table “TempHumid”
▪ Columns: ComputerTime (Unix
Epoch: seconds since 1970)
▪ Temperature (degrees Celsius)
▪ Humidity (percentage)
 Query: Select * fromTempHumid
 Later added statement to
convert Celsius to Fahrenheit
 Many issues trying to enter
MySQL commands into
terminal
 TH.c:
 C program to take
readings from sensor and
insert into database
 Includes/calls wiringPi
library
 Waits 60 seconds
 Loops so it keeps going
until Pi powers down
 TH.log:
 System log file that makes
sureTH.c starts every time
Raspberry Pi is booted up
 Matplotlib:
 open-source, powerful, versatile
math plotting program
 Utilizes python scripts
 GraphTH.py:
 Includes/calls matplotlib library
 Graphs last 24 hours of readings
from MySQL database using
simple x/y coordinates
 CreatesTH.png image and puts
it in server directory /var/www
every 60 seconds
 Issue: supposed to ignore
anomalies, but graphs them
anyway
 Simple Website consists of three
pages:
▪ Home with about section and description,
navigation column and links
▪ Table page that uses PHP to display data
from MySQL database on Pi; converts
ComputerTime to standard date & time
format
▪ Graph page where updated graph PNG
image is uploaded every 60 seconds
 Registered free domain name at
dnsdynamic.org:
▪ Home: http://khalil.wow64.net/index.html
▪ Table: http://khalil.wow64.net/test.php
▪ Graph: http://khalil.wow64.net/graph.html
 DNS is unreliable, goes down
frequently
▪ Use IP address:
http://108.185.174.217/index.html

More Related Content

Similar to CapstonePresentation

Intoduction to physical computing using Raspberry Pi, 18-02-2016
Intoduction to physical computing using Raspberry Pi, 18-02-2016Intoduction to physical computing using Raspberry Pi, 18-02-2016
Intoduction to physical computing using Raspberry Pi, 18-02-2016
Sebin Benjamin
 
IoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxIoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptx
MadhurimaDas52
 
Building the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiBuilding the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry Pi
Neil Broers
 
IoT Aquarium 2
IoT Aquarium 2IoT Aquarium 2
IoT Aquarium 2
Benjamin Chodroff
 
Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014
Mandeesh Singh
 
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
Jayanthi Kannan MK
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
Ayushi Sharma
 
Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014
Mandeesh Singh
 
MPMC presentation.pptx
MPMC presentation.pptxMPMC presentation.pptx
MPMC presentation.pptx
Soundharya54
 
Building Control with Heating and Monitoring
Building Control with Heating and MonitoringBuilding Control with Heating and Monitoring
Building Control with Heating and Monitoring
Matthias Kuhs
 
Up and running with Raspberry Pi
Up and running with Raspberry PiUp and running with Raspberry Pi
Up and running with Raspberry Pi
Shahed Mehbub
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
Vigyat Tripathi
 
My presentation raspberry pi
My presentation raspberry piMy presentation raspberry pi
My presentation raspberry pi
HusainBhaldar21
 
Parallel Rendering of Webpages
Parallel Rendering of WebpagesParallel Rendering of Webpages
Parallel Rendering of Webpages
Langtech
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
imec.archive
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
ABHIJITPATRA23
 
Raspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software SetupRaspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software Setup
RANAALIMAJEEDRAJPUT
 
Rassberry pi
Rassberry piRassberry pi
Rassberry pi
Junaid Raja
 

Similar to CapstonePresentation (20)

Intoduction to physical computing using Raspberry Pi, 18-02-2016
Intoduction to physical computing using Raspberry Pi, 18-02-2016Intoduction to physical computing using Raspberry Pi, 18-02-2016
Intoduction to physical computing using Raspberry Pi, 18-02-2016
 
IoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxIoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptx
 
Building the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiBuilding the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry Pi
 
IoT Aquarium 2
IoT Aquarium 2IoT Aquarium 2
IoT Aquarium 2
 
Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014
 
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014
 
MPMC presentation.pptx
MPMC presentation.pptxMPMC presentation.pptx
MPMC presentation.pptx
 
Building Control with Heating and Monitoring
Building Control with Heating and MonitoringBuilding Control with Heating and Monitoring
Building Control with Heating and Monitoring
 
Up and running with Raspberry Pi
Up and running with Raspberry PiUp and running with Raspberry Pi
Up and running with Raspberry Pi
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
My presentation raspberry pi
My presentation raspberry piMy presentation raspberry pi
My presentation raspberry pi
 
Parallel Rendering of Webpages
Parallel Rendering of WebpagesParallel Rendering of Webpages
Parallel Rendering of Webpages
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Raspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software SetupRaspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software Setup
 
Rassberry pi
Rassberry piRassberry pi
Rassberry pi
 

CapstonePresentation

  • 2.  Set up Raspberry Pi with all necessary software components for a LAMP server  LAMP = Linux/Apache/MySQL/PHP, Perl  Wired temperature/humidity sensor to Pi, acquire and display readings from my bedroom  Worked primarily via terminal and Emacs/Vim text editors  Got it fully up and running online so that it’s accessible from outside of LAN  Attempted to keep budget low ($100 max)
  • 3.  Raspberry Pi Model B+ (2014 model)  700MHz CPU (overclocked to 800MHz)  512MB SDRAM  Ports: HDMI, 4xUSB 2.0, Ethernet, Micro USB power socket  8GB pre-installed microSD card for storage and Raspbian OS  40-pin GPIO connector  Extra peripherals including case and HDMI cable  Total package = ~$60  AM2302 wired temperature-humidity sensor  3 to 5V power  Reads humidity from 0 to 100% with 2 to 5% margin of error  Reads temperature from -40 to 80 degrees Celsius with +-0.5 degrees C margin of error  Cost = $15
  • 4.  PoEAdapter  Provides power over Ethernet conversion  Potentially allows for greater mobility (don’t need to plug into power outlet)  Electrical wiring woes  Out $20…  …But unintentionally worked as a barrier between Pi and sensor to block electrical interference!  Wi-Fi networking  Would have allowed further mobility  UnstableWi-Fi environment at home  Raspberry Pi camera add-on  To capture still images of Pi location, just for fun  Wouldn’t fit properly with case  Budget was climbing  Considered building multiple units to monitor/compare two or more locations at once  Too time consuming and costly
  • 5.  Had to solder sensor wires to proper GPIO (General Purpose Input/Output) pins  Red to pin 1 (power)  Yellow to pin 7 (data)  Black to pin 9 (grounding)  Maybe trickiest part of project (wires are thin and easy to burn through)  GPIO pins not enabled by default  Must be turned on by modifying code in wiringPi C program
  • 6.  Apache PiWeb server initially LAN only; single mostly blank Web page  Created MySQL database, “Monitor”  Table “TempHumid” ▪ Columns: ComputerTime (Unix Epoch: seconds since 1970) ▪ Temperature (degrees Celsius) ▪ Humidity (percentage)  Query: Select * fromTempHumid  Later added statement to convert Celsius to Fahrenheit  Many issues trying to enter MySQL commands into terminal
  • 7.  TH.c:  C program to take readings from sensor and insert into database  Includes/calls wiringPi library  Waits 60 seconds  Loops so it keeps going until Pi powers down  TH.log:  System log file that makes sureTH.c starts every time Raspberry Pi is booted up
  • 8.  Matplotlib:  open-source, powerful, versatile math plotting program  Utilizes python scripts  GraphTH.py:  Includes/calls matplotlib library  Graphs last 24 hours of readings from MySQL database using simple x/y coordinates  CreatesTH.png image and puts it in server directory /var/www every 60 seconds  Issue: supposed to ignore anomalies, but graphs them anyway
  • 9.  Simple Website consists of three pages: ▪ Home with about section and description, navigation column and links ▪ Table page that uses PHP to display data from MySQL database on Pi; converts ComputerTime to standard date & time format ▪ Graph page where updated graph PNG image is uploaded every 60 seconds  Registered free domain name at dnsdynamic.org: ▪ Home: http://khalil.wow64.net/index.html ▪ Table: http://khalil.wow64.net/test.php ▪ Graph: http://khalil.wow64.net/graph.html  DNS is unreliable, goes down frequently ▪ Use IP address: http://108.185.174.217/index.html