Now we will create the first program in this course and we will make the robot move forward.
- 04 Feb 2017
Which block to use
In order to achieve the task for moving the robot on its own, we need a programming block for movement from the green Action palette.
As our robot has two motors with wheels, we should use a block that controls both motors at once.
The first two blocks of the green action palette are blocks that control single motors.
The next two are Move blocks that control two motors at once.
Here we will demonstrate the simpler block of the two - the move steering block.
Adding blocks in the program
Click once on the block in the pallette and place it next to the start block so that a grey rectangle appears. Now click again and the block will snap at position. There is no need to hold the mouse button and drag.
After we start the software we'll build our program for moving forward.
In the software we have a pallet in the bottom of our screen. And there are different pallets here. We use the one that's with the color green and these are actions, actions that the robot could take. In this pallet we have a number of blocks so we'll just take the steering block. Click on it once then move it with the mouse until it snaps right here in the start of the program. And click it again. So, that's our first program. This will make the robot move forward. Do it yourself, implement it and drag and drop a new steering block at the start of the program.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons