Sharp Turns

Being able to make turns is an important part of driving a particular path.

In this section we will be exploring how to make turns.


Right

To turn in either direction you will need to vary the direction and/or speeds of the two motors.

For instance to turn right, you can rotate the left tire forward and the right tire backward at the same speed:


Left

Similarly, to turn left, you reverse and rotate left tire back, and right tire forward.

It's Your Turn!

Load THIS LINK

Use the same Move Tank block to try and make a perfect left turn.

You'll need to decide on which wheel to move fwd/back or keep off, and you will need to do some trial and error on the number of rotations.

Challenges:

Test

Computational Thinking Hints

Remember some of the processes that can help you think like a robot:

Decomposition - Break the problem down into little bits

You need:

Abstraction

Figure out the degrees needed to turn left exactly.

Once you have that you can forget about all the numbers in that block - just think of it as a Turn Left block - you can duplicate it if you need to turn left more than once.

Pattern Recognition

Do the same for a block to turn right.

It should look similar to your left turn block - just reverse which wheel goes forward and which goes back.

Algorithmic Thinking

Try to write down in English what you need to do:

Finish writing the full plan - this is roughly how many blocks of code you will need.

You can also see if you can reuse some of the blocks (duplicate).