Question: 1. You are developing an EasvCPro program for a robot with two motors and four sensors (two bumper switches and two limit switches) to perform

 1. You are developing an EasvCPro program for a robot with

1. You are developing an EasvCPro program for a robot with two motors and four sensors (two bumper switches and two limit switches) to perform the following tasks: The robot should continue moving until it hits an obstacle. Upon hitting an obstacle (any one of the sensors is activated), it should stop, pause, backup, pause, turn and continue. a) b) Explain what is happening in the code outlined by the red box. Fill in the missing code where indicated. include "Mainh" void main (void) int limitl int limit2 int bumperl int bumper.2 while (1-1) limitl-GetDigitalInput (5); limit2- GetDigitalInput (6); bum perl = GetDigitalinput (7); = GetDigitalinp if limitl--1 && limit2-1&& bumperl-1 && bumper2-1) SetPWM (1, 127); SetPWM (2, -127); else FILL IN PROGRAM HERE Explain what is happening in the red box here b. Write your answer for the missing code ere: a

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!