Arduino Function: RobotControl.turn

Description

Make the robot turn a certain number of degrees from its current orientation. The current position is derived from the onboard compass. Magnetic objects in the surrounding may disrupt the compass module. Keep magnets, such as strong speakers, away from the robot.

Syntax

Robot.turn(degrees)

Parameters

The parameter degrees can be a positive number for turning right or a negative number for turning left. *degrees: -180 to 180

Examples

#include 

void setup(){
 Robot.begin();
}
void loop(){
 Robot.turn(90); //Make the robot turn 90 degrees right
 delay(1000);
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc