Case 10 - LED Color Change

Case 10 - LED Color Change

Part 1   Objective

After you upload the program, the light color of the RGB LEDs on CyberPi changes from red to green, from green to blue, and then from blue to red, and this process repeats over and over again.

12.gif

Part 2   Preparation

  • CyberPi x 1

  • USB cable (Type-C) x 1

  • Computer with network access x 1

Connect CyberPi to the computer by using the cable, open mBlock 5 (PC client, web version, or mobile app), connect CyberPi, and select the Upload mode.

13.gif
14.gif

Part 3   Programming

  1. The light color of the RGB LEDs on CyberPi changes from red to green, from green to blue, and then from blue to red, and this process repeats over and over again at 1-second intervals.

15.gif

Part 4   Practice

  1. Try to change the RGB value and see what happens.

  2. Change the duration to speed up or slow down the color change.

 

 

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

Comments

0 comments

Please sign in to leave a comment.