Please written by computer source Build the code of an Arduino platform program that controls the movements of a robot. This robot has two infrared sensors, which make it follow a trajectory drawn on the ground, and two motors, one for each drive wheel. When the sensors detect the need to adjust the route, the engines must be manipulated in order to carry out the adjustment. For example, if the robot is veering to the left, the robot must move to the right until the route is fixed. For this, the motor on the right must be reversed (rotating backwards), and the one on the left must remain on (rotating forward). When the route is right, both motors must be turned forward so that the robot continues to walk straight ahead. The robot has an activation button that, while pressed, the robot must continue moving and, if released, must stop the movement. The sensors work as follows: the sensors are digital and Boolean having only value 0 and value 1; the value 0 means that the sensor did not detect deviation in the trajectory, and the value 1 means that the sensor detected a deviation in the trajectory. Possible movements are counterclockwise (reverse left engine and keep right engine forward), right (reverse right engine and keep left engine forward), forward (keep both engines forward). forward), and backward (reverse both engines).
Please written by computer source
Build the code of an Arduino platform program that controls the movements of a robot. This robot has two infrared sensors, which make it follow a trajectory drawn on the ground, and two motors, one for each drive wheel. When the sensors detect the need to adjust the route, the engines must be manipulated in order to carry out the adjustment. For example, if the robot is veering to the left, the robot must move to the right until the route is fixed. For this, the motor on the right must be reversed (rotating backwards), and the one on the left must remain on (rotating forward). When the route is right, both motors must be turned forward so that the robot continues to walk straight ahead. The robot has an activation button that, while pressed, the robot must continue moving and, if released, must stop the movement. The sensors work as follows: the sensors are digital and Boolean having only value 0 and value 1; the value 0 means that the sensor did not detect deviation in the trajectory, and the value 1 means that the sensor detected a deviation in the trajectory. Possible movements are counterclockwise (reverse left engine and keep right engine forward), right (reverse right engine and keep left engine forward), forward (keep both engines forward). forward), and backward (reverse both engines).
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)