Case 1 - LEDs blink

Part 1 Objective

After you write the program and upload it to mBot, your mBot has basic lighting capabilities.

Part 2 Preparation

  • mBot x 1
  • USB cable (Type-B) x 1
  • Computer with network access x 1
  1. Connect mBot to the computer by using the cable.


  1. Open mBlock 5 (PC client or web version), click +add in the lower left Devices area, select mBot from the Device Library, click Connect, and select the Upload mode. (Live mode: you can click on the blocks to see the real-time program running effect, but you need to keep the cable connected to the computer. Upload mode: you can upload a program to mBot, and you can run the program after you unplug the cable.)


Part 3 Programming

After you upload the program to mBot, the LEDs blink in three colors successively and repeatedly.


Script image


Part 4 Project file

1.LEDs blink.mblock

Part 5 Practice

  1. Change the blinking frequency of the LEDs.
  1. Change the color of the LEDs.
  1. Increase/decrease the number of colors.


Was this article helpful?
5 out of 5 found this helpful



Please sign in to leave a comment.