Question: 6 . ( 6 pts ) You are developing an Easy CPro program for a robot with two motors and four sensors ( two bumper
6 . ( 6 pts ) You are developing an Easy CPro 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 Hinclude " Main h " void main ( void ) int limit int limit int bumper ! int bumper While ( 1 = = 1 ) limit - Get DigitalInput ( 5 ) Limit 2 = Get DigitalInput ( 6 ) bumper1 = Get DigitalInput ( 7 ) ; bumper 2 = Get Digital Input ( 8 ) ; if ( limit 1 = = 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
