Case 15 - Smart night light

Part 1   Objective

After you upload the program, CyberPi detects the ambient light. When the brightness reaches a certain low value and there is sound around, the RGB LEDs on CyberPi light up and are on for some time.

33.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 or web version), connect CyberPi, and select the Upload mode.

34.gif

35.gif

Part 3   Programming

Change the brightness of the RGB LEDs by changing the loudness.

36.gif

Part 4   Practice

Where in your house can you use the smart night light?

 

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

Comments

0 comments

Please sign in to leave a comment.