subject

You are developing an easycpro 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) explain what is happening in the code outlined by the red box. b) fill in the missing code where indicated. #include "main. h"void main (void){int limit1; int limit2; int bumper1; int bumper2; while (1==1){limit1 = getdigitalinput (5); limit2 = getdigitalinput (6); san josé state universitye10 introduction to engineeringpage 4 of 4bumper1 = getdigitalinput (7); bumper2 = getdigitalinput (8); if(limit1==1 & & limit2==1 & & bumper1==1 & & bumper2==1){setpwm (1, 127); setpwm (2, -127); }else{fill in program here}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
1)consider the following code snippet: #ifndef book_h#define book_hconst double max_cost = 1000.0; class book{public: book(); book(double new_cost); void set_cost(double new_cost); double get_cost() const; private: double cost; }; double calculate_terms(book bk); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_cost should be removed since header files should not contain constants.c)the definition of book should be removed since header files should not contain class definitions.d)the body of the calculate_terms function should be added to the header file.
Answers: 1
question
Computers and Technology, 23.06.2019 00:20
Ihave been given the number of guns per 100, and the total firearm-related deaths per 100,000. i have to find the actual number of guns per country and actual number of gun-related deaths. if somebody could show me how to do 1 question, i can finish the rest, i am just confused. tia
Answers: 3
question
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
You know the right answer?
You are developing an easycpro program for a robot with two motors and four sensors (two bumper swit...
Questions
question
Mathematics, 18.02.2021 16:30
question
History, 18.02.2021 16:30
question
Mathematics, 18.02.2021 16:30
Questions on the website: 13722360