Raspberry Pi: Full Stack

Course Features

Course Details

Description
The objective of this course is to take you to a whirlwind tour of the Raspberry Pi, and introduce you to everything that is great about it. Structured as a project, you will become familiar with the various components that make up the web development stack: the operating system, the hardware (including the GPIOs), the application server, web server, database server, and the Python programming language. You will also become familiar with Cloud services that you will integrate into your Raspberry Pi-powered web application. You application will take sensor data and make them available to the user via a web interface that is constructed based on jQuery and HTML5. You will need a Raspberry Pi, a DHT22 sensor, a button, an LED, a few resistors and a breadboard. If you wish to setup wireless networking on your Raspberry Pi, you will also need a USB Wifi dongle. To make the most from this course, you should be familiar with basic programming and be comfortable with the command line.
  What Will I Learn?
Setup the minimal Raspbian operating system to the RPi.
Install the a Python virtual environment.
Install and use Flask, a Python-based web micro-framework
Install and use uWSGI as the application server for Flask
Install and use Nginx light-weight web server
Use the RPi GPIOs as digital input and outputs
Use a DHT22 humidity and temperature sensor
Install and use the SQLite database
Use the Google Chart API to create visual representations of the sensor data
Use JQuery to add interactivity to web pages
Use Plotly for graphical analysis of sensor data
Install and configure a USB Wifi adaptor for your RPi

Requirements
A Raspberry Pi, any version
A Windows, Mac or Linux computer
A DHT11 or DHT22 sensor
An 5mm LED
Resistors
A breadboard and jumper wires
Access to the Internet
A USB Wifi dongle, if available

Who is the target audience?
Some experience in programming is useful.
Python, Javascript (jQuery) and HTML is used throughout the course and some familiarity with basic
programming concepts is expected.
Ability to wire electronics.
Ability to do independent research using online resources

Course Outline:
1.Introduction to the course

Introduction
About the Raspberry Pi
Components
Detailed List of Components you will need
Please read this before continuing!

2.The Operating System
Section Introduction
How to extract a tar.gz file
Installing mini Raspbian using Mac OS X
Installing mini Raspbian using Windows
Section Quiz
Section Conclusion

3.Python and GPIOs
Section Introduction
Setup Python
GPIO basics
Make an LED blink
Read the status of a button
Read temperature and humidity from a digital sensor
Section Quiz
Section Conclusion

4.Setup the Web application stack
Setup the Web application stack
Section Introduction
What is the Web application stack?
Install Nginx, the Web server
Install Flask and venv
Install uWSGI
Setup Upstart
About log files
Serving static assets and Skeleton
Styling our Web application with Skeleton
Debugging a Flask application
Section Quiz
Section Conclusion
5.Building a simple Flask application on the Raspberry Pi
Section Intro
Show DHT22 sensor data in the browser
Install the SQLite3 database
Use a Python script to store sensor reading to the database
Automate sensor data logging with cron and SQLite3
Show historical sensor data in the browser
Section Quiz
Section Conclusion

6.Improving our application with date-time range record selector
Section Introduction
Selecting historical sensor data records with a time-date range
Define a date-time range in the URL
Timezones in Rasbian
Validating timestamps
Tidying up: refactor our application code
Section Quiz
Section Conclusion

7.Improving the user interface
Section Introduction
Adding date range radio buttons
Visualise sensor data with Google Charts
Install a datetime picker widgets
Setting up the datetime picker widget
Setting up time zones on the client side
Setting up time zones on the server side
Link the two pages of the application
Section Quiz
Section Conclusion

8.Setup cloud charting and analysis with Plotly
Section Introduction
Setup Plotly
Add Plotly links
Add Plotly support to the Flask application script
Section Quiz
Section Conclusion

9.Other useful things to know
Install and configure a Wifi USB dongle for wireless networking

10.Conclusion
Conclusion
Other educational content from Peter, including coupon offers
This course does not have any sections.

More Courses by this Instructor