javafinch

How can I make my robot turn 90 degree to the right?


I was wondering if anyone knew how I could make my finch robot turn right by 90 degrees? The below code is what I've tried but it's incorrect as the robot doesn't turn by 90 degrees

robot.setWheelVelocities(100,-80,1000);

https://www.birdbraintechnologies.com/javadoc-finch/edu/cmu/ri/createlab/terk/robot/finch/Finch.html#setWheelVelocities(int,%20int)

https://www.birdbraintechnologies.com/finch/curriculum/lesson/java-lesson-3-turning-the-finch/


Solution

  • You could try setting one of the weels to zero and the other to 100. Something like this:

    robot.setWheelVelocities(10,-10,3000);
    

    If this doesn't work, then measure the angle it has turned, divide 90 by that, and multiply the time by the answer.