Question: The function unsigned char AnalegRead ( unsigned char pin ) ; reads the voltage value at pin and convert the voltage to digital value from
The function
unsigned char AnalegReadunsigned char pin;
reads the voltage value at pin and convert the voltage to digital value from to
Write a function
unsigned char CheckTemperature void ;
a Call the function AnalagReadC to read the voltage at analog pin and assign the return value to a variable value;
b Check if value is more than If true return ; and
c Check if value is less than or equal to If true, return
You are to declare any variables you use.
marks
Write codes in the void setup to initialise the following:
a Initialise the Serial port to operate at ;
b Digital pin D D and D;
c Wait for swo to be closed;
For c you are to call the function in
marks
Write codes in the forever loop assisted by the following comments:
You are to declare any variables you used.
void loop
i
return value to a variable state
II
Assign the value of state to digital pin
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
