Case 5 - Breathing LEDs

Case 5 - Breathing LEDs

 

Part 1   Objective

After you upload the program, the RGB LEDs on the RGB module connected to pin A13 on MegaPi flicker, looking like breathing.

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

10.gif
11.gif

Part 3   Programming

  1. Change the brightness of the RGB LEDs from 0 to 100% and then from 100% to 0, achieving the breathing effect.

12.gif

Part 4   Practice

  1. Try to change the light color of the RGB LEDs.

  2. Try to change the flickering frequency of the RGB LEDs.

 

 

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

Comments

0 comments

Please sign in to leave a comment.