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.

d360a64c-6f95-4bcc-ac2a-6295c1b4416c.gif

  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.)

17c5b71e-ddec-40c4-be65-290b25df38a0.gif

Part 3 Programming

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

d2b96693-a2e4-4433-be41-f1b7764cecfe.gif

Script image

3ba8a258-dfff-40b9-b2ff-d31acf884e9a.png

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?
7 out of 8 found this helpful

Comments

0 comments

Please sign in to leave a comment.