Question: [7 marks] A container's temperature is measured by a sensor and the measurement is a digital value connected to port A. Write a program

[7 marks] A container's temperature is measured by a sensor and the

 

[7 marks] A container's temperature is measured by a sensor and the measurement is a digital value connected to port A. Write a program to turn the RGB LED on to light red when the temperature is greater than MAX value, light blue when the temperature is less than MIN value, and light green when the temperature is between MIN and MAX. To set the MIN and MAX values, switches are connected to ports H. MIN = the value on pins 0-3 on port H - should be between 0 and 15 MAX=15+ the value on pins 4-7 on port H - should be between 15 and 30 The program should continuously read port H and compare the temperature against the MIN and MAX values. Write a C program to this application.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!