Summary and Setup
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
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.
We will also need to install an MQTT client and for this we’ll use MQTTX. You can download MQTTX from https://mqttx.app/.