Press A on remote controller to start the program control.
By setting different speed of each motor, mbot is able to change the direction.
In the last part of program, you can see that mbot will change the direction if it detects obstacle in front of it.
The code above is typed by ourselves.
It optimize move speed and behavior after it change direction.