The Environment control system should be reading the temperature sensor and humidity sensor

computer science


During this assignment you will create an Environment controller that can control the temperature and humidity in a room .

The following LOs are assessed via this assignment:

  • Describe the different attributes and uses of programmable logic devices.
  • Write a simple C language programme for a microcontroller or microprocessor based system;

Description of the design requirements (work that you will be undertaking within and also outside the lab hours).

The Environment control system should be reading the temperature sensor and humidity sensor (via the "sht31" sensor) every 1 second and display them on the first line of the LCD screen (during the first lab session you will be given a demonstration with regards setting up the on line simulator). 

The room's temperature and humidity levels will be entered via the GUI of the sht31 sensor (during demo session you will see how you can do this).  

The Environment actuator system comprises of the following apparatus (the operation status of each one should be shown via the LEDs and LCD screen).

  • a Heater (to heat up the room),
  • an air conditioner (to Cool Down the room),
  • a humidifier (to "Steam up" the room), and
  • a dehumidifier (to "Steam down" the room). 

The LEDs (Led 1-4) are to be setup as following: 

The operation status of each one of these apparatus is going to be shown by the 4 LEDs as following: 

  • Heater: Led1, when heater is on Led 1 will be on, when heater is off Led 1 will be off.
  • Air conditioner : Led2, when air conditioner is on Led 2 will be on, when air conditioner is off Led 2 will be off.
  • Humidifier: Led3, when Humidifier is on Led 3 will be on, when humidifier is off Led 3 will be off.
  • Dehumidifier: Led4, when Dehumidifier is on Led 4 will be on, when dehumidifier is off Led 4 will be off.

The LCD screen is to be setup as following: 

Line 1 (room temperature and humidity): (location: 0,0) T=?? C,  (location: 64,0) (H=?? %

Lines 2 and 3: "Mode of operation", the following messages and coordinates are to be used: 

  1.  Heater ON; "Heating Room UP"   (location 0,10)
  2.  Air conditioner ON: "Cooling Room Down" (location 0,10)
  3.  Humidity ON: "Increasing Humidity" (location 0,20)
  4.  Dehumidifier ON: "Decreasing Humidity" (location 0.20) 

Desired Room temperature and humidity levels are: 

Temperature: 20 degrees Celsius

Humidity: 60%

Once again (this information is repeated): Update of the room's environment readings and updates on the LCD and LEDs should be done every1 second.

Submission (you will only have 1 chance to submit!!, so do make sure you have the final version of the following work).

Submission requirements and marking scheme (this assignment worth 15% of the overall module, hence the mark allocation is done to reflect this by Mark allocations):               

A document file that will contain the following 3 Parts: 

Part1: A flow chart diagram of the software architecture (Individual)  (5 Marks)

Part2: Code (structure and operation operation) (individual) (5 Marks)

Part3: Comments in line with the Code (individual) (5 Marks)

Marking and Feedback

A rubric will be designed for the marking of this assignment and general feedback will be provided via discussion during one of the lecture sessions. 

all the programming it related to ARM mBed and has to be done on Arm mBed website.

Related Questions in computer science category