Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the next problem, you may nd it helpful go to the E10 lab and use EasyC Pro to test the code. EasyC Pro is

image text in transcribed
For the next problem, you may nd it helpful go to the E10 lab and use EasyC Pro to test the code. EasyC Pro is also available in the open computer lab in E390. 6. {6 pts) 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 limitl; int limit2; int bumperl ; int bumper2 ; while [1==1) { limitl = GetDigitalloput (5); limit2 = GetDigitalInput (5); bumperl = GetDigitalIopot ('7); bumperZ = GetDigitalInput (8]; if{limitl==l &&liniit2==1 8:8: bumper1==1 8:81 bumper2==1) Page 3 of 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions