The robot has a compass module, which it uses to find its direction. This sketch will make sure the robot goes towards a certain direction.
When you hold the robot in your hands and rotate, you will the screen change, indicating direction.
NB : magnets will interfere with the compass. If you're getting unexpected results, check to make sure there are none around.
int direc=180at the beginning of the code. Change this value to another number, between 0 and 359. 0 represents north, 90 is east, 180 is south, and 270 is west. Where do you want to go?
Check how the compass works