Raspberry Pi: Full Stack
4.6 (532 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
8,151 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Raspberry Pi: Full Stack to your Wishlist.

Add to Wishlist

Raspberry Pi: Full Stack

A whirlwind tour of full-stack web application development on the Raspberry Pi
Bestselling
4.6 (532 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
8,151 students enrolled
Created by Peter Dalmaris
Last updated 4/2017
English
English
Current price: $10 Original price: $50 Discount: 80% off
1 day left at this price!
30-Day Money-Back Guarantee
Includes:
  • 8 hours on-demand video
  • 2 Articles
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
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
View Curriculum
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
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.

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
Students Who Viewed This Course Also Viewed
Curriculum For This Course
61 Lectures
07:54:56
+
Introduction to the course
5 Lectures 13:54

A few things about this course, how it is organized and its objectives.

Preview 02:17

What is the Raspberry Pi? Why is it such an important machine? ... and more details about the RPi.

About the Raspberry Pi
04:45

An overview of the main components that you will need in this course.

Preview 04:22

A shoping list for the components needed in this course.

Preview IFrame

A few things to help you get the most out of this course.

Please read this before continuing!
02:30
+
The Operating System
5 Lectures 40:10

Introduction to Section 2, The operating system.

Section Introduction
00:25

How to extract a tar.gz file
08:14

This section shows you how to install Minibian to your RPi using a Macintosh.

If you are using a Windows computer you could skip to the next lecture (although this one still contains information that you will find useful).

If you are using a Raspberry Pi 3, please note that you will need the updated Minibian Jessie 2016-3-12 release of the OS. I have worked through the stack setup guide and I can confirm that it works for RPi 3.

Installing mini Raspbian using Mac OS X
16:35

This lecture shows you how to install Minibian on your RPi using a Windows 8 computer.

If you are using a Raspberry Pi 3, please note that you will need the updated Minibian Jessie 2016-3-12 release of the OS. I have worked through the stack setup guide and I can confirm that it works for RPi 3.

PRO TIP:

You can simplify the login procedure by modifying the shortcut's target in the properties:

C:\Users\USERNAME\Downloads\putty.exe -ssh YOURUSERHERE@192.168.0.5 -pw YOURPASSWORD HERE

Installing mini Raspbian using Windows
14:42

Section Quiz
3 questions

The conclusion to Section 2.

Section Conclusion
00:14
+
Python and GPIOs
7 Lectures 01:07:03

Section 3 introduction: Python and GPIOs.

Section Introduction
00:25

In this lecture, we'll install Python and the convenient Python Virtual Environment. Although you can use several other languages with your Raspberry Pi, Python is the most popular, with a lot of documentation of publicly available code that we can use.

Setup Python
13:55

In this lecture, I will explain the basics of GPIOs, and this will help a lot in understanding their use.

GPIO basics
08:36

In this lecture, we'll take the next step. I will show you how to connect an LED to the Raspberry Pi and turn it on and off via a Python script.

Make an LED blink
18:01

In this lecture, I will show how to use a GPIO pin as a digital input to read the state of a connected digital device. We'll use a simple button to simulate such a device.

If you don't have a pull-up resistor handy, you can activate the RPi's internal pull-up. To do this, use this code:

GPIO.setup(inPin, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)

Thank you to Fabio Quinzi for suggesting this!

As an aside, I am not sure what the actual resistance of the internal pull-up or down is (it seems that the pull-down is 50KOhm, a very large value, and the pull-ups is smaller), and I have heard rumors of electrical noise being an issue in electrically "noisy" environments (like in a factory), so in most cases using a known external resistor is a better option.

Read the status of a button
09:52

In this lecture I will show you how to use a digital sensor, the DHT22, with your RPi.

Read temperature and humidity from a digital sensor
15:53

Section Quiz
4 questions

Section 3 conclusion.

Section Conclusion
00:21
+
Setup the Web application stack
11 Lectures 01:24:33

Section 4 introduction: Setting up the Web application stack.

Section Introduction
00:24

Understanding the application stack will help you understand the role that each of the components you will see going forward plays. It may sound a bit "academic", but it is worth the effort.

This lecture is about the application stack.

Preview 07:03

In this lecture, you will learn how to install the web server, Nginx.

Install Nginx, the Web server
02:49

I this lecture I will show you how to install the Python virtual environment that we will dedicate to running our application, and then install and test the Flask web development micro-framework.

CORRECTION!

At 2:11 in this lecture I mention that the "dot command executes executable files". This is not correct.

The "activate" file is a script, not executable.

As per the documentation, "(the dot) command, when invoked from the command-line, executes a script".

Please read more about this here: http://www.tldp.org/LDP/abs/html/internal.html#SOURCEREF

Install Flask and venv
09:17

In this lecture, I will show you how to install our application server, uWSGI, and configure it so that it works with Nginx to execute our Flask application.

It is a fairly long and error-prone process, so you will get the most out of this lecture if you can allocate yourself 20 uninterrupted minutes.

Install uWSGI
18:40

In this lecture you will learn how to configure your application so that the operating system is in charge of starting uWSGI when it boots.

Setup Upstart
10:19

Log files are invaluable in helping us find and fix bugs. In this lecture, I'll discuss the most important of the log files that are relevant to our application.

About log files
08:49

In this lecture, we will shift our focus to the user interface. I like it when the application I work on looks better than bare-bones, so I choose to apply a nice template to it early on. I will show you how to install and apply the Skeleton boilerplate template and make our application look better than basic.

Serving static assets and Skeleton
11:55

In this lecture I will show you how to apply the Skeleton style to the application.

Styling our Web application with Skeleton
09:12

In this lecture I will give you a few simple tips on debugging a Flask application.

Debugging a Flask application
05:46

Section Quiz
6 questions

Section 4 conclusion.

Section Conclusion
00:19
+
Building a simple Flask application on the Raspberry Pi
7 Lectures 01:02:24

Section 5 Introduction: Building the Flask application.

Section Intro
00:31

In this lecture I will show you how to display temperature and humidity values from the DHT22 in a web browser window.

Show DHT22 sensor data in the browser
14:07

In this lecture I will show you how to install the SQLite3 database in your RPi.

Install the SQLite3 database
14:05

In this lecture we'll use a Python script to get values from the DHT22 and store them in new database records.

Use a Python script to store sensor reading to the database
07:34

In this lecture, we'll automate the collection of values from the DHT22 by setting up a cron job.

Automate sensor data logging with cron and SQLite3
12:57

In this lecture we will setup a new page in our application in which we will display historical DHT22 data coming from the database.

Show historical sensor data in the browser
12:48

Section Quiz
3 questions

Section 5 conclusion.

Section Conclusion
00:22
+
Improving our application with date-time range record selector
7 Lectures 30:57

Section 6 introduction: Adding date/time range widgets and validation.

Section Introduction
00:26

In this lecture I will show you how to create database queries that return data based on start and end date/time stamps.

Selecting historical sensor data records with a time-date range
07:12

In this lecture, I will show you how to display DHT22 database records based on a date/time range specified in the URL.

Define a date-time range in the URL
10:49

In this lecture, I discuss timezones in Raspbian/Minibian.

Timezones in Rasbian
02:03

In this lecture, I show you how to validate the date/time range information submitted by the user.

Validating timestamps
06:24

In this lecture, we will do a basic refactoring the Python code.

Tidying up: refactor our application code
03:32

Section Quiz
3 questions

Section 6 conclusion.

Section Conclusion
00:31
+
Improving the user interface
9 Lectures 01:21:57

Section 7 introduction: Improving the UI.

Section Introduction
00:29

In this section I will show you how to add date/time radio buttons to make easy to browse through past records.

Adding date range radio buttons
19:17

In this lecture, we'll visualise the temperature and humidity values for the selected date/time range by embedding Google charts to the records page.

Visualise sensor data with Google Charts
18:35

In this lecture, we will continue improving the user interface. We'll make it easy to select a datetime range for the records that we want to retrieve from the database by installing datetime widgets. In the next lecture, I'll show you how to set it up.

Install a datetime picker widgets
07:11

In this lecture, I'll show you how to set up the datetime picker widget and make it work.

If you are having trouble with the datetime picker widget, please try to install the full version of the plugin using the link in the External Resouces box (below).

Setting up the datetime picker widget
07:57

In this lecture, I will start the process of fixing the annoying time zone problem by updating the code on the client side, and then move on to the server.

Setting up time zones on the client side
08:31

In this lecture, I will show you how to complete the timezone calculation capability on the server side.

Setting up time zones on the server side
14:00

In this lecture, we'll add links to make it easy to move between the two pages of the application.

It's only a small change to the user interface.

Link the two pages of the application
05:29

Section Quiz
3 questions

Section 7 conclusion.

Section Conclusion
00:28
+
Setup cloud charting and analysis with Plotly
5 Lectures 32:18

Section 7 conclusion: Plotly.

Section Introduction
00:15

In this lecture, I will discuss Plotly, show you some of the things you can do with it, and set it up on your Raspberry Pi.

Setup Plotly
10:19

In this lecture I'll show you how to create the user interface for Plotly on the client side of the application.

Even though it looks simple from a user perspective, the way that it works under the hood is fairly involved.

Add Plotly links
10:05

In this lecture, which is the last for this section, I will show you how to create this application logic on the server side.

Add Plotly support to the Flask application script
11:11

Section Quiz
3 questions

Section 8 conclusion.

Section Conclusion
00:28
+
Other useful things to know
3 Lectures 52:20

In this lecture I will show you how to install a Wifi USB dongle to your Raspberry Pi and go wireless (at least for the networking part).

As long as you have a Wifi dongle with a supported chipset and a WPA/WPA2 wireless router, the process described in this lecture should work for you.

Install and configure a Wifi USB dongle for wireless networking
22:22

In this lecture I walk you through the setup process for getting the Python Virtual Environment, Nginx, uwsgi and Upstart using Minibian in 30 minutes. The process is documented in a document that you can access using the resources link.

This is part 1 of the lecture.

Quick setup guide for Nginx, uwsgi and Upstart Part 1
16:57

In this lecture I walk you through the setup process for getting the Python Virtual Environment, Nginx, uwsgi and Upstart using Minibian in 30 minutes. The process is documented in a document that you can access using the resources link.

This is part 1 of the lecture.

Quick setup guide for Nginx, uwsgi and Upstart Part 2
13:01
+
Conclusion
2 Lectures 09:48

Course conclusion. What's next??

Conclusion
02:25

Other educational content from Peter, including coupon offers
07:23
About the Instructor
Peter Dalmaris
4.6 Average rating
4,162 Reviews
39,308 Students
12 Courses
Tech Explorer

Peter Dalmaris is an electronics hobbyist and Maker, creator of eight online video courses on DIY electronics and author of three technical books. 

As a Chief Tech Explorer since 2013 at Tech Explorations, the company he founded in Sydney, Australia, Peter’s mission is to explore technology and help educate the world. 

A life-long learner, Peter’s core skill is in explaining difficult concepts through video and text. With over 15 years in tertiary teaching experience, Peter has developed a simple yet comprehensive style in teaching that students from all around the world appreciate. 

His passion for technology and in particular for the world of DIY open source hardware has been a powerful driver that has guided his own personal development and his work through Tech Explorations.

Peter’s current online courses have helped over 30,000 people from around the world to be better Makers. His video courses include:

* Arduino Step by Step: Your Complete Guide

* Advanced Arduino Boards and Tools

* Raspberry Pi: Full Stack

* Raspberry Pi: Make a Workbench Automation Computer

* Kicad Like a Pro

* The Electronics Workbench: A Setup Guide

* Arduino Fun: Make a High Tech Remote Controlled Car

* Beginning Arduino: Make a environment monitor system

Peter’s books are:

* Kicad Like a Pro: Learn the World’s Favourite Open Source PCB Electronic Design Automation tool

* Raspberry Pi: Full Stack: A whirlwind tour of full-stack web application development on the Raspberry Pi

* Arduino: a comprehensive starting up guide for complete beginners