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 ?

swagduck78:
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!

Are you for real? Or is this some kind of joke? You want someone to write code for a robot that they know nothing about? You're not going to tell us anything about the robot and you expect someone here to know how to make it turn? How exactly do you think that's going to work.

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: