How do i make my arduino go in a square

Can someone help me I'm trying to find a way to make my robot turn. If you can teach me or send me a code i would be happy. Thank you!

How many wheels does the robot have ?

Do you have any means of measuring the heading ?

Do you have any means of measuring wheel rotation ?

while(1) {
forward(1);  //adjust to suit
turn(90);
}

jremington:

while(1) {

forward(1);  //adjust to suit
turn(90);
}

I'm sure they want an Arduino sketch.

#incude <RobotControl.h>
void setup()
{
  RobotControl.begin();
}
void loop()
{
  forward(1);  //adjust to suit
  turn(90);
}

Now the only task is to write the RobotControl library. :slight_smile: