Challenge :
Intermediate
Intermediate
Place an obstacle approximately 10 cm in front of the robot. Write a code such that the robot will always move forward and only stop when it detects an obstacle in front of it.
Place a straight ground marker 10 cm in front of the robot in which the white part of the marker is closer to the robot. Write a code to make the robot move straight and stop when it reaches the black part of the marker.
Similar to problem 2, place a straight ground marker 10 cm in front of the robot in which the white part of the marker is closer to the robot. Write a code to make the robot move straight forward at a speed of 150 and slow down when it reaches the black part of the marker and moves forward at a speed of 150 after it leaves the black part of the marker.
Place an obstacle 10 cm in front of the robot. Write a code such that the robot will always move forward and move backwards for 5 seconds only when it collides with an obstacle. (Note : Use robot accelerometer value to solve this question)
Click here for the solutions.