Case 7 - Voice-activated RGB LEDs (II)

Part 1   Objective

After you upload the program, when you play music, the brightness of the RGB LEDs on the xLight wooden base, LED strip, or LED string changes with the loudness detected by the microphone.

31.gif

Part 2   Preparation

  • xLight control box x 1

  • USB cable (Type-C) x 1

  • Computer with network access x 1

  • Wooden base or LED strip or LED string

Connect the wooden base, LED strip, or LED string to the xLight control box, connect the xLight control box to the computer by using the cable, open mBlock 5 (PC client or web version), delete the default device, click +add, select xLight from the Device Library and then click Set as mostly used device in the upper left corner, click Connect, and select the Upload mode.

32.gif

33.gif

Part 3   Programming

Set the light color of the RGB LEDs on the wooden base as red, and use Sensing blocks to control the brightness of the RGB LEDs with the loudness detected by the microphone.

34.gif

Part 4   Practice

Try to control the change of the light color 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.