Raspberry Pi: Full Stack

A whirlwind tour of full-stack web application development on the Raspberry Pi
4.4 (314 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.
6,046 students enrolled Bestselling in Raspberry Pi
$19
$50
62% off
Take This Course
  • Lectures 58
  • Length 7 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 6/2015 English

Course 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 are the 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

What am I going to get from this course?

  • 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

What 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

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction to the course
02:17

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

04:45

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

04:22

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

IFrame

A shoping list for the components needed in this course.

Article

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

Section 2: The Operating System
00:25

Introduction to Section 2, The operating system.

16:35

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.

14:42

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

Section Quiz
3 questions
00:14

The conclusion to Section 2.

Section 3: Python and GPIOs
00:25

Section 3 introduction: Python and GPIOs.

13:55

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.

08:36

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

18:01

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.

09:52

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.

15:53

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

Section Quiz
4 questions
00:21

Section 3 conclusion.

Section 4: Setup the Web application stack
00:24

Section 4 introduction: Setting up the Web application stack.

07:03

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.

02:49

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

09:17

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

18:40

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.

10:19

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.

08:49

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.

11:55

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.

09:12

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

05:46

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

Section Quiz
6 questions
00:19

Section 4 conclusion.

Section 5: Building a simple Flask application on the Raspberry Pi
00:31

Section 5 Introduction: Building the Flask application.

14:07

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

14:05

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

07:34

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

12:57

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

12:48

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

Section Quiz
3 questions
00:22

Section 5 conclusion.

Section 6: Improving our application with date-time range record selector
00:26

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

07:12

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

10:49

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

02:03

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

06:24

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

03:32

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

Section Quiz
3 questions
00:31

Section 6 conclusion.

Section 7: Improving the user interface
00:29

Section 7 introduction: Improving the UI.

19:17

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

18:35

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.

07:11

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.

07:57

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).

08:31

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.

14:00

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

05:29

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.

Section Quiz
3 questions
00:28

Section 7 conclusion.

Section 8: Setup cloud charting and analysis with Plotly
00:15

Section 7 conclusion: Plotly.

10:19

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.

10:05

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.

11:11

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

Section Quiz
3 questions
00:28

Section 8 conclusion.

Section 9: Other useful things to know
22:22

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.

Section 10: Conclusion
02:25

Course conclusion. What's next??

Other educational content from Peter, including coupon offers
Article

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

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


Ready to start learning?
Take This Course