BUILDING PROGRAMS
Longer programs are built up by joining blocks together. The program runs the blocks in order from left to right.
Drag another Move Tank block to your program space and connect it to the right of the one you already have.
Select the orange tab and choose the Wait (sand timer) block.
Drag the Wait block so it pushes between your two green Move Tank blocks.
Drag another Move Tank block to your program space and connect it to the right of the one you already have.
Select the orange tab and choose the Wait (sand timer) block.
Drag the Wait block so it pushes between your two green Move Tank blocks.
The program pictured above will make your robot perform three tasks, one after the other, from left to right. They are connected in sequence. (A sequence is an ordered list.)
You can change the settings on any block, then download again to update the program on your robot.
You can change the settings on any block, then download again to update the program on your robot.
Change the settings on all 3 blocks in your program to make your robot
- move forward for 1 second
- stop and wait for 2 seconds
- move backwards (reverse) at power -40 for 1 rotation. You can drag the slider OR type the number in the boxes. To keep the robot travelling in a straight line the power driving each wheel should be the same.
Download and run.
Have you noticed the changes to the pictures on the block when you change the settings?
When you write longer programs these pictures will help remind you which block is doing what. The two Move Tank blocks in the picture above have different mode settings – the one on the left is set to On for Seconds and the other to On for Rotations.
Have you noticed the changes to the pictures on the block when you change the settings?
When you write longer programs these pictures will help remind you which block is doing what. The two Move Tank blocks in the picture above have different mode settings – the one on the left is set to On for Seconds and the other to On for Rotations.
MOVE QUESTIONS
What do you think would happen if you put smaller wheels on the robot then ran your 'exactly 1 metre' program again?
What do you think would happen to your robot if one wheel was bigger than the other when you ran your “exactly 1 metre” program? Why?
Why do you think the MINDSTORMS program doesn’t just let you tell the robot how many centimetres or metres you want it to go?
When you make a change to your program and download it to the robot, what has happened to the old version of your program on the robot?
What do you think would happen if you put the brake on one wheel and turned the other wheel?
What do you think would happen to your robot if one wheel was bigger than the other when you ran your “exactly 1 metre” program? Why?
Why do you think the MINDSTORMS program doesn’t just let you tell the robot how many centimetres or metres you want it to go?
When you make a change to your program and download it to the robot, what has happened to the old version of your program on the robot?
What do you think would happen if you put the brake on one wheel and turned the other wheel?