Microcontrollers For Iot

A guide to the Arduino platform focused specifically on the inexpensive WiFi-enabled ESP8266 microcontroller!

Last updated 2022-01-10 | 4.5

- Program Arduino and ESP8266 Microcontrollers to work with Digital & Analog signals
- Build Internet-of-Things circuits that use the ESP8266 to exchange information over WiFi as either a client
- server or both.
- Configure the ESP8266 to scan and connect to existing WiFi networks
- or to act as an access point to create its own WiFi network.

What you'll learn

Program Arduino and ESP8266 Microcontrollers to work with Digital & Analog signals
Build Internet-of-Things circuits that use the ESP8266 to exchange information over WiFi as either a client
server or both.
Configure the ESP8266 to scan and connect to existing WiFi networks
or to act as an access point to create its own WiFi network.

* Requirements

* You'll need some materials to follow along with the lectures and build the demonstration circuits. This includes the ESP8266 ESP-12 microcontroller on a breakout board
* a USB to Serial device that supports 3.3V operation
* a computer capable of running Arduino software 1.6.4 or above
* and some common electronic components like wires
* LEDs
* buttons
* breadboards
* and voltage regulators. A lecture is dedicated to talking about the selection of materials recommended for the course.

Description

Arduino has created an open-source, easy-to-use hardware & software platform that has made microcontrollers and electronics accessible to a broad audience of makers. Dozens of variations on the platform exist today, and dedicated devices found in 3D printers, Quadcopters, Media players and robots have bloomed thanks to a diverse ecosystem of vendors and enthusiasts. These devices are following the trend of adding more and more networking and communication capabilities, pushing toward applications on the Internet of Things.

This course is a guide to the exciting world of internet-enabled microcontrollers using the Arduino platform. Starting with the fundamentals of Arduino programming, the course builds expertise in Analog/Digital Input & Output, and other core topics used to prototype electronic devices. The course then extends the experience by focusing on programming the ESP8266 to scan and connect to pre-existing WiFi networks, or create its own network as an access point. This course features lectures with information to help students build the demonstrations as they go, and challenges students to extend the lecture-provided circuits and code to add additional features. Finally, there is a projects section at the end of the course where new projects will be added to illustrate special topics and techniques, based on student interests and questions!

Who this course is for:

  • This course is for those new to microcontroller programming, or have some experience with Arduino but have never worked with WiFi networking on that platform. Some prior programming experience is recommended, but not required. Basic understanding of electronics concepts of voltage, resistance and current is assumed. This course is probably not for you if you have never been introduced to basic electronics or programming concepts.

Course content

4 sections • 28 lectures

Introduction Preview 07:15

This lecture provides an introduction to the course, including the motivation behind the class, the course objectives, the intended audience and how the lectures are organized.

Class Overview Preview 06:05

An overview of the separate sections of the course.

Microcontrollers Preview 04:34

Introduction to microcontrollers, explaining points of differentiation and how they can be applied to solve problems.

Introduction to the ESP8266 Preview 13:04

This lecture introduces the microcontroller that is used in this course, the ESP8266. At the end of the lecture, students will be able to identify points of differentiation between the different versions of this microcontroller, and compare its features to that of the Arduino Uno.

Materials Preview 11:22

This lecture covers the suggested and required materials needed to follow and build the circuits and programs covered in this course. At the end of this lecture, students will have an understanding of what materials are going to be useful to get the most out of the course.

Concepts: Input, Output, Analog, Digital Preview 03:58

This is a base-level lecture that discusses the concepts of input & output functions for analog and digital signals. At the conclusion of this lecture, students will be able to identify whether a signal is analog or digital, and whether the signal should be a microcontroller input or output.

Arduino Software Setup & Configuration Preview 07:46

This lecture covers installing the Arduino software, an overview of the user interface, and adding support for the ESP8266 microcontroller to the software. Students will be able to configure their Arduino software to work with the ESP8266 microcontroller at the end of this lecture.

Wiring the ESP8266 - Overview Preview 02:52

An overview of the steps needed to prepare the ESP8266 for use and programming.

Wiring the ESP8266 - Step 1: Power Preview 05:53

This lecture shows the student how to set up a stable power source for the ESP8266. At the end of this lecture, the student will be able to build a circuit that supplies a stable 3.3V from a battery pack or other power supply.

Wiring the ESP8266 - Step 2: Fixed Connections Preview 07:14

Step by step, this lecture covers the fixed connections and how to add a reset button and a program button. At the end of this lecture, the student will be able to extend the circuit from the previous lecture to complete the connections necessary for the ESP8266 to run programs already loaded in memory.

Wiring the ESP8266 - Step 3: Serial Connections Preview 05:34

With this lecture, the students will learn how to connect a USB to Serial converter to the ESP8266 for programming and debugging purposes.

Digital Output - Blinking LED Preview 09:34

The first project steps the student through the process of writing and uploading a program to blink an LED using the ESP8266. At the end of this lecture, the student will know how to build a circuit with an LED and upload a program to the microcontroller to make that LED blink.

Programming Concepts: Variables Preview 12:00

This base-level lecture covers the variables, variable scope, and common variable types used in Wiring (the Arduino programming language). At the end of the lecture, students will be able to identify what types of values belong to different variable types, and the scope of a variable in a sketch.

Analog Output - Ramp LED Preview 07:22

This lecture uses the circuit from Lecture 12 to demonstrate analog output using the microcontroller, while introducing the method of pulse-width-modulation (PWM) to generate analog signals. Students will be able to write a sketch that uses analog outputs using PWM to generate analog signals.

Programming Concepts: Flow Control Preview 09:59

This base-level lecture covers the topics of conditional statements, loops and flow control. At the end of this lecture, students will be able to evaluate the value of variables to determine which code blocks to execute, and run a code block multiple times using standard boolean logic.

Digital Input - Reading Buttons Preview 10:41

With this lecture, the student will be able to create a circuit with a button connected to the ESP8266, and program the microcontroller to detect if the button has been pressed or not.

Serial Communication Preview 06:50

Serial communication is a handy way to share information between the microcontroller and another device, whether its a computer, another microcontroller, or a dedicated serial component. This lecture uses the circuit from Lecture 15 to relay the button state over serial. Students will be able to program the microcontroller to send debugging information to a serial terminal at the end of this lecture.

Interrupts Preview 05:44

Interupts are a program flow control mechanism that allows signals to "interupt" the normal program process to take a small action. This lecture explains how to set up an interupt on a digital input pin and program a response to the interrupt. At the end of this lecture, students will be able to use interrupts to respond to digital input events.

Analog Input - Potentiometer Preview 09:38

This lecture shows how to connect a potentiometer to the ESP8266 to read it's value, and report it over the serial connection first shown in Lecture 17. Students will be able to connect analog signals and read their values using the microcontroller by the end of this lecture.

WiFi Overview - ESP8266 Capabilities Preview 05:47

This lecture discusses some of the common terms of WiFi communication, and discusses some of the capabilities of the ESP8266. Students will be able to explain the difference between an access point and a station, and between a client and a server.

Scanning for Networks Preview 04:14

This lecture provides an overview for common WiFi functions of the ESP8266. Students will be able to program the ESP8266 to scan for active WiFi networks at the end of this lecture.

HyperText Transfer Protocol (HTTP) Overview Preview 10:20

Much of the data exchange on the internet is handled using the HyperText Transfer Protocol. While the HTTP standard has a thick list of features and specifications, this lecture covers the very basics that make it possible to retrieve information from the internet.

WiFi Client Preview 06:08

The fundamentals of setting up a WiFi client are discussed in this lecture. Students will be able to program the microcontroller to connect to an existing WiFi network to retrieve a web page with time information on it at the end of this lecture.

Posting to ThingSpeak Preview 06:29

ThingSpeak is a free service that takes information from Internet of Things devices and provides a running graph of the values posted. This lecture will show the step by step process for setting up a ThingSpeak channel and posting data from the ESP8266. Students will be able to set up their own ThingSpeak channels and program the ESP8266 to post data to those channels at the end of this lecture.

WiFi Server Preview 13:03

This lecture covers the basic process of programming the ESP8266 to act as a WiFi server. By the end of this lecture, students will know how to serve simple web pages from the ESP8266 on an existing WiFi network.

WiFi Access Point Preview 05:34

The previous lectures have relied on using an existing WiFi network to provide connectivity between the ESP8266 and other devices. This lecture will cover how to use the ESP8266 to establish its own independent WiFi network, and use code from the previous lecture to serve simple web pages. Students will be able to use the ESP8266 to create an independent WiFi network that serves web pages by the end of this lecture.

Projects and Special Topics Overview Preview 01:11

This lecture describes some of the initial projects and special topics that will be covered. As time progresses, additional topics and projects will be added.

Project 1 - Temperature & Light Measurements Preview 17:51

The Temperature and Light project is an introduction to extending the ESP8266 analog input capability to support multiple channels using the MCP3008 chip and SPI communication. It's a simple project, but it introduces several special topics that will be handy for other projects. At the end of this lecture, the student will be able to measure Temperature and brightness using the ESP8266 with the MCP3008, and will be ready to add other sensors to the system!