Simple C program
$30-100 USD
K zaplacení v momentě doručení
We need a simple c program with proper comments and flow chart/algorithm for a control system (Climate).
## Deliverables
Develop a top-level control routine in 'C' language to run a control unit for a simple
climate-control system. The submission should be in source form.
C (programming)
The system already comes with simple functions defined that provide direct access to the hardware
sensors and controls:
GetAmbientTemperature (input, an unsigned integer value)
GetPanelButtons (input, an unsigned integer value)
SetBuzzer (output, 1/0 for on/off)
SetCooling (output, 1/0 for on/off)
SetFanSpeed (output, an unsigned integer from 0-5)
SetHeatingElement (output, 1/0 for on/off)
SetPanelDisplay (output, 23-bit bitfield as unsigned integer)
The GetAmbientTemperature value is an unsigned integer with range 0 to 800 representing
temperatures from 20 to 60 degrees Celsius with [url removed, login to view] precision.
The SetPanelDisplay value is a bit field controlling the LCD matrix:
0-3
Ambient Second digit
4-7
Ambient First digit
8
Ambient Minus sign
9-11
Fan display
12-15
Target Second digit
16-19
Target First digit
20
"Auto" mode matrix toggle
21
"Cool only" mode matrix toggle
22
"Heat only" mode matrix toggle
The digit matrices will be blank if set >9, while the others will display nothing when set to 0.
SetPanelDisplay and SetBuzzer will latch the last given value.
The GetPanelButtons result represents:
0 No button pressed
1 Power button
2 Target Temperature Up
3 Target Temperature Down
4 Mode button
The control panel buttons are not latched but are debounced
Mode is either "auto", "cool only" or "heat only":
? in "auto" mode, the unit should always try to achieve target temperature
? in "cool only" mode, the unit should only try to reduce the ambient temperature to target
? in "heat only" mode, the unit should only try to increase the ambient temperature to target
You should consider how a user would expect the unit to behave, both from an interface perspective
and also given a range of target and ambient temperatures. You should also consider sensible cold-
start behaviour.
Identifikační číslo projektu: #2749655