Question: You are designing a program for a robot controlled by a PIC microcontroller. The robot has a bump detector switch wired to one pin of

You are designing a program for a robot controlled by a PIC microcontroller. The robot has a bump detector switch wired to one pin of the microcontroller. The robot should go forward until it hits an obstacle. As soon as the robot hits an obstacle (the bump switch sends a ON signal), the robot should stop, turn right by 90 degrees and then continue its forward motion.
Your main program contains the forward motion. You have also available a list of instructions to turn right by 90 degrees.
Explain how you would manage the interruption of the main program (forward motion) when the bump detector switch detects an obstacle. Then how the program will continue the forward motion when the turn right is finished.

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!