Summary and Schedule
This lesson introduces learners to the Internet of Things. A few things are required to take part in this lesson:
- A laptop or a desktop computer with Linux, MacOS or Windows as an operating system. You can also use a Raspberry Pi with any of its available operating systems as a workstation - as long as the operating system can run the Arduino IDE.
- The Arduino IDE
- MQTTX - an MQTT 5.0 desktop client
- A microcontroller board such as an Arduino, an ESP32 or an ESP8266. Each of these microcontroller boards come in quite a few flavours. Ideally the whole class will have the same version to work with. However, this will be determined by the way the workshop is organised. If the instructor provides all the hardware then it is likely that everyone will have the same devices. If learners bring their own devices there are likely to be differences and the instructor will have to deal with the slight differences that that might require when it comes to wiring the circuits and writing the code.
- A USB cable that connects the microcontroller board to the PC/laptop
- If you are using DHT11/12 and LDR modules you only need female to female connectors. However, if you are using the individual components it would be better to use a breadboard and some male to female connectors.
More information about the installation of the Arduino IDE and MQTTX can be found on the setup page.
- Downloading and installing the Arduino IDE
- DHT11/DHT12 Guide
- Specifications and Fritzing component downloads
Setup Instructions | Download files required for the lesson | |
Duration: 00h 00m | 1. An Introduction to the Internet of Things |
What is the Internet of Things? How does one connect something to the Internet of Things? What is a microcontroller? What is an Arduino? |
Duration: 00h 12m | 2. The Arduino IDE |
What is an IDE? What is the purpose of the Arduino IDE? Which microcontrollers can be programmed with the Arduino IDE? How is the Arduino IDE used to program a microcontroller? How are microcontroller boards connected to the computer? How does the Arduino IDE connect to the microcontroller? How would you upload a program? :::::::::::::::::::::::::::::::::::::::::::::::: |
Duration: 00h 24m | 3. Understanding the code |
In what language do we program in the Arduino IDE? What do the keywords, void, setup and loop do? How can we add explanatory comments to the code? What is a variable? What is a constant? What is a function? |
Duration: 00h 36m | 4. Connecting the first sensor |
Can you identify a DHT11 and DHT22 temperature/humidity sensor? Can you identify the pins on the DHT sensor? Can you identify the pins on the ESP that we will need to use? Can you explain what the code will do? |
Duration: 00h 48m | 5. Connecting the second sensor | Question |
Duration: 01h 00m | 6. Combining the two circuits | |
Duration: 01h 12m | 7. Using MQTT for the Internet of Things |
What is MQTT? How does MQTT work? What is an MQTT publisher? What is an MQTT broker? What is an MQTT subscriber? What is a client? What is a server? |
Duration: 01h 24m | 8. Subscribing to an MQTT topic |
What does one need to get the information published by sensors on the
IoT? What is meant by “topic” in terms of MQTT? How can I save the published data to file? |
Duration: 01h 36m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Software Setup
The Arduino IDE
For this workshop we need to download and install the Arduino Integrated Development Environment (IDE). There are now quite few different options for doing this which are all available on the Arduino website.
In the first instance there is an option for programming your microcontroller board from a web browser using the web editor. If you have a stable Internet connection this would be a good option. Although this version of the IDE runs in a web browser you still need to install a browser plugin and a small software component called the Create Agent. You will also need to create an account on the Arduino website. One of the advantages of making use of this option is that your sketches (the programs you write to upload to the microcontroller) are saved in The Cloud which makes it easy to retrieve if you have to work on another computer.
For the Windows operating system you can download the IDE as a zip file, an exe file or you can get it from the Windows app store. There are also installation packages to be downloaded if you are using Linux or MacOS. Follow the instructions on the Arduino website for the option you decide to select. Your instructor should be able to guide you in your decision.
MQTTX
We will also need to install an MQTT client and for this we’ll use MQTTX. You can download MQTTX from https://mqttx.app/.