Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3 The function unsigned char AnalogRead ( unsigned char pin ) ; reads the voltage value at pin and convert the voltage to digital value
The function
unsigned char AnalogReadunsigned 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 AnalogRead to read the voltage at analog pin A 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
a Call the function GhegkTemperature to assign thet
return value to a variable state
b Send the value of state to Serial port
J
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started