This project aims to control output LEDs, a buzzer and an LCD based on the measured temperature from the sensor which is replaced by the potentiometer. Data was passed using queues to send data back and forth through tasks and additional help from UART was used to communicate between the user and the program itself.
If the measured temperature is below the setpoint, the green LED (the heater) will light up until they are equal again, and the red LED will light up when the temperature is above 50 °C and turns off when it’s sub 50 °C. The buzzer also notifies the user when the measured temperature is above 50 °C alongside the red LED
- Potentiometer (measured temperature)
- User’s setpoint temperature
- LCD Display of temperatures
- 2 LEDs: Green (heater) & Red (alarm)
- Buzzer
![]() |
![]() |
---|---|
![]() |
![]() |
File Name | Description |
---|---|
main.c | Main file including 4 tasks, a structure, 4 functions (toString(), printchar(), print(), GPIO_init() |
LCD_config.c | A library file for implementing LCD functions |
ADC.c | A library file for initializing ADC |
Task Name | Description |
---|---|
Task 1 | Main function which takes the measured temperature using ADC and compares it with the user’s setpoint and then turns the LEDs and the buzzer ON/OFF using the queues methods and sends the setpoint and measured temperature values to Task 3 which receives these values and displays them on the LCD. |
Task 2 | Takes the setpoint temperature from the user through UART and sends it to Task 1 through a queue |
Task 3 | Receives the setpoint and measured temperatures from Task 1 and displays them on the LCD |
Task 4 | Receives the buzzer state from Task 1 and turns it ON/OFF |
LCD Output | Putty Output |
---|---|
![]() |
![]() |