Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) Revise the above program to move forward for one second and then turn to the left and move for another second whenever the distance
1) Revise the above program to move forward for one second and then turn to the left and move for another second whenever the distance between an obstacle and the robot car falls below 30 cm. 2) Revise the program to check for obstacles in three directions of front, left, and right. If obstacles with distances of less than 30cm are detected in all three directions, the robot car has to move backward at the speed of 150 for one second and then turn to the right. THIS IS CODING IN ARDUINO C++ LANGUAGE
ATTENTION: The robot car will move in this part. You have to make sure that its motion is safe. Part-C The following program uses function_XXX, move(Forward, 100) and move(stop_it, 0) commands to change the robot car to a follow-me robot. When the distance between an obstacle and the robot car falls below 20cm the robot car moves toward the obstacle for one second otherwise it stops and reads the ultrasonic sensor to detect obstacles. function_xxx(get_Distance, int min, int max) This function returns true if the distance between the ultrasonic sensor and an obstacle falls between min and max values (minStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started