Home
Welcome to the MicroPython
Course!
This course is designed to provide you with a comprehensive introduction to building an IoT project with MicroPython on the ESP32. You will learn how to read sensor data, control a water pump, communicate via MQTT, and create a dashboard for remote monitoring - all through hands-on code examples!
Course overview
- Setup & Basics: Introduction to MicroPython, flashing the ESP32 with the firmware, setting up your development environment and learn the basics of MicroPython by controlling the onboard LED.
- Sensor Integration: Interface with a soil moisture sensor to monitor your plantβs water needs.
- Actuator Control: Learn to drive a pump (via a relay module) based on sensor readings.
- MQTT Communication: Transmit sensor data and receive remote commands using MQTT.
- Dashboard Development: Create an interactive dashboard to visualize sensor data and control your watering system.
graph LR
subgraph TOP[ ]
direction BT
Cloud[Cloud Dashboard]
end
subgraph MID[ ]
direction LR
Sensors
ESP32[ESP32 Basics]
Actuators
end
Cloud <--MQTT--> ESP32
Sensors --> ESP32
ESP32 --> Actuators
click ESP32 "./setup" _self
click Sensors "./sensors" _self
click Actuators "./actuator" _self
click Cloud "./mqtt" _self
%% Styling
classDef active fill:#950f42,stroke:#333,stroke-width:1px;
class MID subgraphBox;
class TOP subgraphBox2;
%% Subgraph styling workaround (pseudo-class)
classDef subgraphBox fill:#ff000000,stroke:#950f42,stroke-width:2px,color:#fff;
classDef subgraphBox2 fill:#ff000000,stroke:#950f42,stroke-width:0px,color:#fff;
Tools
In this course, we use MicroPython running on the ESP32 along with these great tools:


Sneak peek
Here is a sneak peek of selected topics we cover in this course:
-
MicroPython Basics & LED Control
Learn how to flash your ESP32 with MicroPython and start by blinking the onboard LED.
-
-
-
Sensor Integration
Read data from a soil moisture sensor to detect your plantβs water needs.
-
Pump Control
Control a water pump (via a relay) to automate the irrigation process.
-
-
-
MQTT Communication
Transmit sensor data and receive remote commands using MQTT for real-time control.
-
Dashboard Development
Build a user-friendly dashboard to monitor sensor readings and control the pump.
-
Needed Hardware
The following hardware is needed for this course:
- 1x ESP32-Wroom-32 Breakout Board
- 1x Adafruit Submersible 3V DC Water Pump
- 1x MOSFET Modul
- 1x HW-390 Moisture Sensor
- 1x Micro USB Cable
- 1x Jumper Wires (F-M & F-F)
- 1x 1k Ohm Resistor
Expected outcome
By the end of this course, you will have built a complete smart plant watering system. You will know how to:
- Monitor soil moisture using a sensor.
- Automatically control a water pump based on sensor data.
- Communicate with your device via MQTT.
- Visualize data and interact with your system through a dashboard.