With programming one of the first things to do is output. Many programmers start with a Hello world program where they output the word Hello world to the screen. While we could do that with our robot we will start by making it move.
If you followed the EXPLOR3R Building Instructions you have a robot that is ready to drive. The left drive motor should be plugged into the B port on the brick and the right drive motor should be plugged into the C port.
We will use the Lego software – at this stage you can do this with any tool.
Programming blocks are colour coded. The green blocks are the action blocks. The move tank block can be dragged on to the screen. Connect it to the green arrow – it will start when you run the program.
If you click on the block you will see options – for now we want to stick with number of rotations. The left and right wheels will be 50 (100 % is forward full speed, -100% is backwards full speed).
Your program is now ready – before you begin, make sure your computer is not on a table where it could fall off if it drove. You need to download the program to your robot and run it.
Lego has great (and short) videos walking you through this process.
Make sure you can run your program more than once. Being familiar with using the brick will make it easier.
Pro tip: make sure to name your projects – if you have groups label your bricks and name them so each group knows what robot they are using.
Run your program multiple times and set the number of rotations to a different amount each time. Graph the result – can you predict how far your robot will travel with 7 rotations – how close were you?