Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 . 4 Write codes in the void setupre to initialise the following: ( a ) Initialise the Serial port to operate at 9 6
Write codes in the void setupre 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 press; and
d Send characters followed by via serial port to the Bluetooth module.
For c and d you are to call the respective functions in and
marks
Write codes in the forever loop assisted by the following comments:
You are to declare any variables you used.
void loop
f
if the reading from PIR motion is HIGH
Sound the Pizea buzzer
I Send a message To Bluetooth
marks
a Write codes to set bit and bit of the bit variable swNal to with the rest of the bits of swyal remains unchanged
b Write codes to clear bits and of the bit variable aumkal to with the rest of the bits of numval remains unchanged
a If the initial value in the variable num is what will be the new value in the variable num after executing the following instruction? Show your working as necessary.
b Write CStatements to print the value of num on Serial Monitor as shown in Figure
Figure
where NNNNNNNN is the value of num in binary after executing a
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