Question: Task 3 : Adaptive toggling delay We now modify the value of the delay between successive togglings, until 2 5 toggling operations have been executed.

Task 3: Adaptive toggling delay
We now modify the value of the delay between successive togglings, until 25 toggling operations have been
executed. The program then prints a "task completed" message.
In main. c, comment out task_2 and uncomment task_3. Open task_3 and observe the code
provided.
Build and flash the application.
Observe that the program never executes the "task completed" print statement. What is the problem?
Correct the code to obtain the desired behavior. It should look similar to Figure 3.
What is the effect of defining the delay variable as static? What would happen if we don't?
-1) Terminal s-1 Terminal 1s
Serial/dev/ttyACMO (2/20/189:09 AM) &s
counter =16
counter =17
counter -18
counter =19
counter =20
counter =21
counter =22
counter =23
counter =24
Congrat'si You completed task 3
Figure 3: Expected output of Task 3.
 Task 3: Adaptive toggling delay We now modify the value of

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 Databases Questions!