Once you have installed the mBlock software (or have learned how to run mBlock in a browser), you can try running a simple example program on the robot. This program can be used to check whether the connection between the computer and the robot is successful. If you can run this test program. you are ready to start exploring our tutorial on programming the robot or dive into the lesson plans.
<aside> ⚠️ Please run through the sections explaining how to install the software and how to connect to the robot before trying to run the current example program.
</aside>
As part of our lesson plans, we've included several example programs for the robot. We'll run one of these programs to help familiarize you with using our example programs. All our programs are uploaded to the mBlock website, and the instructions for using them are similar across all programs.
Start by navigating to the test program on the mBlock website:
MyFirstProgram - mBlock Community
This should bring up the webpage shown in the screenshot below.
Next, click on Source Code
. This will show the program in the online version of mBlock, as shown in the screenshot below.
You can run the program using this online version or download it to your computer. To download the program, use the file menu: File > Save to your computer
.
<aside> 💡
You can also download the program to your computer by clicking File
and selecting Save to my computer
. This allows you to open and edit the program if you have installed mBlock on your computer (windows and mac only. Chromebooks need to use the online version of mBlock)
</aside>
Please see here for instructions on connecting to the robot using the USB cable or wirelessly. If you have previously used Upload
mode, you should reset the robot to Live
mode by following these instructions.
Once you have connected the robot, you can click the green flag on the left side of the screen to run the program. You can also stop the program by clicking the stop button next to the green flag.
The program is very simple. It sets the robot’s LED light to blue for a second, then to green. This is repeated indefinitely. If you see the lights on the robot flashing blue and green, you have successfully run your first program. You can now edit the program by adding more blocks and rerunning it.