Design a task to switch between the two LED patterns given below using a push button switch.
Consider the following requirements while implementing the task,
Requirements
Main Loop Constraint:
The controller is constantly busy executing critical tasks inside the while()
loop in the main()
as shown in the code below, so use Interrupts to implement tasks.
main () {
while (true) {
//In this loop Microcontroller is busy in monitoring and performing critical tasks constantly.
}
}