
assemble the ESP32 dev kit, moisture sensor, USB cable, and jumpers, wiring VCC to 3.3V, GND to ground, and sensor’s analog output to pin 35, while keeping sensor dry.
Create the moisture tracker header in the include directory, define header guards and public interfaces, document the moisture tracker task function, and specify parameters in microseconds for the IoT project.
Add the moisture tracker task to the main ESP IDF project, configure a requires line, include the moisture tracker header, create the FreeRTOS task with xTaskCreate, and implement error handling.
Create a wifi handler component for an esp32 project using freeRTOS event loops and event groups to manage wifi and ip events, enabling robust WAN connectivity.
Develop the moisture sensor component with a header and implementation, using adc readings, a reading buffer, calibration, and robust mean calculations for reliable moisture readings.
Implement the adc calibration function, initialize a calibration scheme, use board-saved values to correct raw adc measurements, and apply a robust mean filter to moisture sensor readings.
Compute a robust moisture reading using a ten-sample readings buffer and a median-based robust min, verified by buffer validation, sorting with std::sort, and clearing after calculation.
Implement the get moisture rating function to read moisture robust mean, round to int, update readings buffer, and include ESP IDF ADC in cmakelists.txt for the moisture tracker task.
Define the backend environment with env_variables, setting the database path, host, and port. Build the plants api with hello, submit reading, and get readings by plant name routes, with swagger.
In this hands-on course, you’ll deepen your knowledge of C, C++, and Python while learning how to build a complete IoT system from the ground up.
By the end of this course, you’ll have created a fully functional IoT plant moisture tracker, capable of monitoring your plants’ health, sending real-time data to your backend, and displaying the information on your client interface.
What You’ll Learn
The course is divided into three key parts:
Part 1:
We’ll start by using C and C++ with the ESP-IDF framework to program the ESP-32 microcontroller. You’ll learn how to write efficient code to measure soil moisture and transmit the data wirelessly (WiFi).
Part 2:
Next, we’ll build the backend using Python and Flask. This server will process and store incoming data from the IoT device, acting as the backbone of the system.
Part 3:
Finally, we’ll design an intuitive client interface using Python and Kivy, where you can view moisture readings retrieved from the backend in real time.
Who Should Take This Course?
This course is designed for individuals with a basic understanding of C, C++, and Python, who are eager to:
Advance their programming skills to an intermediate level.
Learn core concepts of IoT development through hands-on projects.
Explore frameworks like ESP-IDF, Flask, and Kivy while working with microcontrollers and backend systems.
To complete this course, you will need to purchase the following materials using your own means (you can get a PDF file from the Lecture 2 => Resources with example purchase links, you are not required to buy the course in order to download this file), the total cost of the kit should be around 30 EUR / USD.
1. ESP32 DEVKIT-V1 BOARD
2. USB-A to Micro-USB cable
3. Capacitive Soil Moisture Sensor V1.2
4. Male to Female Jumper cables