First Code - Ranger

Lesson #1 - Getting Connected

We will be using both iPads and Laptops with the Makeblock robots. For this first lesson, we will focus on using the computer to program the robot. For this lesson you will need:

  • mBot Ranger Brain
  • usb cable

Steps to Connect:

  1. Connect the USB cable from your computer to the bots USB input and turn the robot on. (The power for the robot must be on for the computer to recognize the connection)
  2. Open mBlock from your desktop.
  3. In mBlock, go to the “Boards” menu and choose “mBot Ranger (Auriga)” from the drop-down menu.

Upgrade Firmware:

  1. We want to make sure our firmware is upgraded to the latest version (if you don’t want the latest firmware, skip this step). Choose “Connect” and choose “SERIAL PORT COM” and then “Upgrade Firmware
  2. Yours should show in Bold Face Font if a firmware is available and you can update.

Connect to Serial Port:

  1. Make sure to connect your Auriga to your to the correct serial port. You should hear a beep when the are linked.
  2. At this point, your robot should be set up to receive your program. You can start connecting your blocks and create the functionality you want. While the robot is turned on and connected, it will be able to take the code you make and you can test it in real-time. You can start and stop the program by using the green flag and red stop sign icons.
  3. Once you have the code you want, you can upload it onto your Auriga by DOUBLE CLICKING the “Auriga Program” block.

Now Create your first Code!

  1. Now create your first program. We are going to test the multicoloured LED lights. Write a program that will show all the colours of Summit Middle's Teams on the LED array on the top of the mBot Ranger Brain.
  2. Use the sample code (pictured to the right), as your example. Search through the different folders of commands to find the right ones.
  3. To run it, Click on the Auriga Program block at the top of your code.
  4. After that, experiment with different codes and see how you can improve, change and personalize this code.
  5. Can you write a code where each light is turn off and on at different times, or different colours? How about creating an animation with the lights?