


Internet of Everything
Arduino-MQTT Development Teaching
(Part Three)

Welcome, students, to this creative and technologically captivating innovative technology class! Have you ever thought about how every object in our lives can “speak” and interact with us in wonderful ways? This is not a fantasy, but a future vision painted by Internet of Things (IoT) technology!
In this era of the Internet of Everything, the IoT acts like an invisible giant net, tightly connecting various devices around the world. From smart home appliances to smart cities, from health monitoring to environmental sensing, the IoT is quietly changing our lives. Today, we will personally unveil the mysteries of the IoT, embarking on a journey to explore its secrets through the two powerful tools: Arduino and ESP32!
Imagine, with just a tap on your phone, the lights in your home can change colors according to your mood; or, with a small potentiometer, you can remotely control devices thousands of miles away. These seemingly sci-fi scenarios will become a reality in our class!
We will utilize the convenience and flexibility of Arduino, combined with the powerful networking capabilities of ESP32, to achieve remote monitoring and control of devices through the MQTT protocol, the “language of the IoT.” Whether manually adjusting the brightness of an RGB LED or sending commands over the internet to change the lights at will, all of this will be demonstrated in our practice.
This is not just a class; it is an excellent opportunity to stimulate innovative thinking and enhance practical skills. Let us work together to sail through the ocean of the IoT and create our intelligent future! Are you ready? Let’s embark on this exciting innovative technology journey together!
ESP32: The Core Platform for IoT Development


If Arduino is the “gateway” to entry-level electronic development, then ESP32 is the “key” to entering the world of IoT. The ESP32 is a microcontroller that integrates dual-mode communication with Wi-Fi and Bluetooth. It is not only powerful and affordable but also equipped with rich peripheral interfaces and open-source resources, making it very suitable for IoT application development.
Compared to Arduino, the biggest advantage of ESP32 is its wireless communication capability. It supports two network modes: Access Point (AP) mode and Station (STA) mode. In AP mode, the ESP32 can create its own Wi-Fi network for other devices to connect; in STA mode, it can connect to existing routers like a smartphone. This dual-mode design greatly expands its application scenarios.

To demonstrate the basic functions of ESP32, the course provides a Blink example program, similar to Arduino, which controls the GPIO pins to output high and low levels to make an LED blink.

This indicates that ESP32 is compatible with Arduino in basic IO control, allowing learners to transition seamlessly.
More importantly, ESP32 supports various development environments, such as Arduino IDE, MicroPython, Lua, etc., allowing developers to choose the most suitable toolchain based on their needs. This flexibility makes ESP32 suitable not only for beginners but also for advanced developers.


The course also provides code examples for connecting ESP32 to Wi-Fi, outputting connection status through serial communication, which is convenient for debugging and monitoring. This step is a prerequisite for achieving remote control and is the foundation for IoT devices to connect to the network.
Through this part of the learning, students will not only understand the hardware characteristics and networking capabilities of ESP32 but also master its basic programming methods, preparing for subsequent implementation of MQTT communication and remote control.
end
Who Are We?
WHO ARE WE?Since 2016, the Shanghai Municipal Education Commission and the Shanghai Municipal Science and Technology Commission have jointly established the “Shanghai Youth Science Innovation Practice Station” project, aiming to integrate high-quality resources from universities and research institutes, select and enroll some high school students in the city to learn at the practice station, and connect various fields of innovative technology carriers both inside and outside the school, integrating interdisciplinary and diverse courses, and facilitating multi-dimensional evaluation of scientific inquiry topics online and offline, allowing students to broaden their scientific horizons, train their thinking methods, enrich their learning experiences, cultivate innovative spirit, enhance practical abilities, accumulate scientific literacy, and shape humanistic feelings.Currently, the “Shanghai Youth Science Innovation Practice Station” project has a total of 37 practice stations, including Fudan Computer, Jiaotong University Cybersecurity, Tongji Physics, East China Normal University Geography, Shanghai Astronomical Observatory Astronomy, etc., offering 14 major categories of innovative technology courses such as biology, medicine, chemistry, computer science, environment, mathematics, engineering optics, engineering mechanics, astronomy, horticulture, physics, geography, design, and electronic science and technology;Each practice station is composed of four practice points from district-level experimental demonstration high schools, youth activity centers (youth science stations), science popularization venues, research institutes, and other units.There are currently 37 practice stations and 148 practice points.The practice station project enrolls about 4,440 high school students each year, further improving the scientific innovation practice education model through learning professional courses, dialogues with authoritative experts, hands-on experimental exploration, field visits and research, writing topic papers, and on-site reporting and defense, to reserve talents for Shanghai to build a globally influential science and technology innovation center.