Case 1 - LED Control

Case 1 - LED Control

 

Part 1   Objective

After you upload the program, the RGB LEDs on the RGB module connected to pin A13 on MegaPi blink and light up one by one.

origin_img_v2_1c653702-7482-4369-b150-a0f9eaa2d0bg.gif
22.gif

Part 2   Preparation

  • MegaPi x 1
  • RGB module x 1
  • 3-pin jumper x 1
  • USB cable x 1
  • Computer with network access x 1
Connect MegaPi to the computer by using the cable, connect the RGB module to MegaPi by using the jumper, open mBlock 5 (PC client, web version, or mobile app), click +add, select mBot Mega from the Device Library, click Connect, and select the Upload mode.
33.gif
44.gif

Part 3   Programming

  1. Blinking: When you turn on mBot Mega, the RGB LEDs are on and off alternatively.

55.gif

  1. RGB LEDs lighting up one by one: When you turn on mBot Mega, the RGB LEDs on the RGB module light up one by one. After all the RGB LEDs are on, they go off.

66.gif

Part 4   Practice

  1. Try to change the light color of the RGB LEDs.
  2. Try to make the RGB LEDs light up and then go off one by one.

 

 

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

Comments

0 comments

Please sign in to leave a comment.