make the robot go a circle

hello,who can help me,that how to program with VEXIQ ,make the robot go a circle, r = 30cm, thanks a lot.:smiley:

Hello Richard~
This task is easily done,. Basically, you need to program the motor (s) controlling the wheels on one side of the bot to turn faster than the motor(s) and wheels on the other side. Experimenting with this speed difference will give you tighter or wider turns.

However, before anyone in the forum can offer you more specific details, he or she will need more information from you. For example:

What programming language are you using?

Do you want the bot to drive in a circle autonomously or with the remote control?

What type of drive system are you using?

Does your bot have steering capabilities or is it built like a clawbot with a tank / skidsteer method of turning?

What is the wheelbase of your bot?

The more information you can provide, the more likely it is that you will get the specific help you are seeking.

You might want to try looking at some of the programming examples available online for your chosen programming language, too. Try some sample code and go from there. After all, the best way to learn programming is to experiment with writing lots of programs!

1 Like

For accuracy, you might like to use the gyro sensor for making the turns. Maybe something like this:

task main()
{
    int forwardDistance = 40;
    int currentDegrees = 0;
    int turnAngle = 3;

    resetGyro(gyroSensor);
    while(currentDegrees < 360)
    {
        currentDegrees = currentDegrees +turnAngle;
        moveMotorTarget(leftMotor, forwardDistance, 15);
        moveMotorTarget(rightMotor, forwardDistance, 15);
        waitUntilMotorMoveComplete(leftMotor);

        while(getGyroDegrees(gyroSensor) < currentDegrees)
        {
            setMotor(leftMotor, -25);
            setMotor(rightMotor, 25);
        }
    }
}
1 Like

thank you very much. no gyro,only setmotortarget and waituntilmotorstop.