First-time setup
Before we start playing with the MQTT protocol for our IoT class, there are some initial preparations that we must do.
The supported devices
In the class, we can either use ESP 32 or Lolin Wemos D1 Mini. The later -- especially the cloned version -- is very cheap! However, we can always use other IoT enabled devices, such as Arduino UNO R4 WiFi, Raspberry Pi, and many more.
![]() |
![]() |
Arduino IDE
Download and install the Arduino IDE from the official website .
Additional board manager
ESP 8266 and ESP 32 are not in the default Arduino board list.
For ESP 8266, add http://arduino.esp8266.com/stable/package_esp8266com_index.json to the Additional Boards Manager URLs, which can be found in this menu: File >> "Preferences >> Settings
As for ESP 32, add https://espressif.github.io/arduino-esp32/package_esp32_index.json to the Additional Boards Manager URLs

ESP 32
Follow this official documentation form Espressif:
https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html
ESP 8266
Follow this official documentation form Espressif:
https://arduino-esp8266.readthedocs.io/en/latest/installing.html
The cheapest 8266 board is the clone version which uses CH340/341 chip for communication purposes.
In this case, if you are using Windows, follow this instruction to install the necessary driver:
- Video guide: https://www.youtube.com/watch?v=IxH_1LApjPc
- Driver: v3.4 or v3.5
There are some reports that the latest driver is problematic. Thus, we will use v3.4 or v3.5.
Finally, in the Arduino IDE, we can now set the device to: "LOLIN (WEMOS) D1 mini (clone)". Do this from the menu Tools >> Board >> ESP 8266 Boards (3.1.2) >> LOLIN (WEMOS) D1 mini (clone)

