Lesson objectives
In this lesson, you will test the fully integrated IoT system we have built so far. The goal is to ensure that all components — reading sensor data, updating the TFT screen, and web server functionality — work smoothly together. This involves testing the system in different environments, checking whether data updates correctly, and troubleshooting any problems.
By the end of this lesson, you will be able to run the IoT system confidently under different conditions and identify common problems related to connections, sensor precision, and system stability.
Introduction
At this point, you have a complete IoT system that reads temperature and humidity data from the AHT10 sensor, displays the information on a TFT screen, and serves it through a web server over WiFi.
Now it is time to put your project to the test.
Testing is a critical phase in any project. It lets you confirm that the system behaves as expected and helps find errors that were not obvious during development. You will learn how to test the system systematically, check sensor accuracy, confirm data synchronization between the TFT and web server, and troubleshoot common problems.
Step 1: Initial checks
Before starting thorough testing, it is important to perform some initial checks on your IoT system. These checks ensure that the basic components work correctly before carrying out more advanced tests.
-
Confirm basic functionality
-
TFT screen: Make sure the TFT screen displays sensor data correctly. You should be able to see temperature and humidity values in real time.
-
Web server: Open a browser on a device connected to the same WiFi network and visit the ESP32 IP address. Confirm that the web page loads and displays the correct temperature and humidity values.
-
Sensor precision: Compare the readings on the TFT display with an external thermometer/hygrometer (if available) to assess whether the AHT10 sensor provides accurate data.
-
Step 2: Testing in different environments
Now that basic functionality is confirmed, it is time to test your IoT system in different environments to ensure reliability under varying conditions.
-
Indoor testing
-
Normal room conditions: Place the device in a room with normal temperature and humidity. Monitor data on the TFT screen and web server for consistency.
-
Increased humidity: Simulate higher humidity by placing the sensor near a moisture source (such as a humidifier or a kitchen). Check that the system updates both display and web data correctly.
-
-
Outdoor testing
-
Temperature variation: Take the device outside and test it under different temperature conditions (for example, day and night). Observe how well the sensor responds and how quickly data updates.
-
Weather exposure: Test the system under different weather conditions, such as sun or rain. Protect the hardware from water and direct sunlight, and observe how the sensor responds to environmental changes.
-
-
Testing the wireless connection
-
WiFi range: Gradually move the device away from the router to test its range. Make sure the web server continues responding and displaying data. Note any disconnections or delays in updates.
-
WiFi reconnection: Simulate a temporary loss of WiFi by switching off the router or moving the device out of range. Once the connection is restored, check whether the ESP32 resumes operation and whether the web server is still accessible.
-
List of required components:
![]() |
AHT10 high-precision temperature and humidity sensor |
![]() |
TTGO T-Display ESP32 16MB with WiFi, Bluetooth and 1.1" color LCD screen |
![]() |
Dupont cables, 40 pcs |
Step 3: Confirming data synchronization
An important part of this lesson is checking that the data on the TFT display matches the data on the web server — called data synchronization.
-
Check data consistency
-
Monitor updates: While the sensor collects data, watch the TFT screen and refresh the web page in your browser. Check that the readings are identical.
-
Time delays: Assess any visible delays between the TFT display and the web page. The delay should be minimal (under one second), and both interfaces should be synchronized.
-
-
Handling multiple clients
-
Open the web page on multiple devices: Visit the ESP32 web page from several devices (such as a laptop, smartphone, and tablet). Confirm that all devices display the same data simultaneously.
-
Simulate traffic: Refresh the web page quickly on multiple devices to test how the ESP32 handles multiple requests. See whether the server remains stable or problems arise.
-
Step 4: Troubleshooting common problems
You may encounter problems during testing. Here are some common errors and solutions:
-
WiFi connection problems
-
Symptom: The web page does not load, or the ESP32 does not connect.
-
Solution: Check that the WiFi credentials in the code are correct. Make sure the signal is strong enough. Consider a stronger router or WiFi repeater if the connection drops frequently.
-
-
TFT display errors
-
Symptom: The TFT does not update or displays incorrect data.
-
Solution: Check the connections between the ESP32 and the TFT display. Confirm that the screen is initialized correctly in the code and the sensor works as intended.
-
-
Sensor accuracy
-
Symptom: Temperature and humidity are incorrect or fluctuate wildly.
-
Solution: Place the sensor in a stable environment. Check for loose connections or electrical noise. If necessary, calibrate the sensor by comparing it with a reliable reference.
-
-
Slow web server
-
Symptom: The web server is slow or does not update data in real time.
-
Solution: Check that the ESP32 is not overloaded — look for long
delay()functions in the loop. Make sure requests are handled correctly and the connection is stable.
-
Step 5: Completing testing
After testing in different environments and scenarios, you should have a good overview of your system's stability and functionality. Successful testing means:
-
Accurate data: The sensor reads and displays the correct temperature and humidity.
-
Synchronized interfaces: The TFT display and web server show the same data without significant delays.
-
Stable connection: The ESP32 maintains the WiFi connection and displays the web page without interruptions.
If everything works as intended — congratulations! You now have a fully functional and thoroughly tested IoT system.
Conclusion
In this lesson, you learned to test the complete IoT system in different environments, check data synchronization, and troubleshoot common problems. The testing phase is essential for ensuring that your system is reliable, accurate, and ready for real-world use.
With successful testing, you now have a solid foundation for developing the project further — for example, by adding more sensors, increasing data complexity, or improving the web interface. Testing helps ensure stability and performance and prepares you for future extensions and real-world applications.
About the measurements: The station in this series measures temperature and relative humidity using the AHT10. These are indoor climate readings, not direct measurements of CO2, VOCs, or particles. The series name “air quality monitoring” should be understood with this limitation.


