This project focuses on building a simple yet functional embedded system that measures environmental conditions and displays them in real time. Using the RT‑Spark Development Board as the main controller, the system reads temperature and humidity data from an AHT21 digital sensor and outputs the results to the board’s LCD module.
📘How does it work?
1. Configuring the microcontroller pins and peripheralsFirst, set up all the hardware needed for the system:
- GPIO pins for the LCD backlight, LCD reset, and the AHT21 sensor’s I²C lines
- FSMC (Flexible Static Memory Controller) to communicate with the LCD using an 8‑bit data bus
- System clock so the microcontroller runs at a stable frequency
This ensures the RT‑Spark board can physically communicate with both the LCD and the AHT21 sensor.
Using the LCD driver library:
- Turn on and clear the LCD
- Draw borders and labels (“Temp:”, “Hum:”, etc.)
- Prepare the screen for real‑time updates
Through this, the project is now clean and has a readable display layout.
Open the link provided to view the video.
https://drive.google.com/file/d/15B-uErS99z5m-w3o4puS2uvTAZjHZgk7/view?usp=sharing
SummaryThe project was accomplished by first configuring the microcontroller’s pins and peripherals, followed by setting up the LCD interface and initializing the AHT21 temperature and humidity sensor. Once communication with the sensor was established, the system continuously acquired temperature and humidity readings, applied filtering techniques to stabilize and validate the data, and displayed the processed values on the LCD in real time. This workflow highlights the successful integration of external libraries, effective hardware configuration, reliable sensor data handling, and the development of a fully operational embedded application.













Comments