Case 4 - Detect the light intensity

Part 1   Objective

After you upload the program, the screen of CyberPi displays the light intensity detected by the light sensor in real time.


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.



Part 3   Programming

Detect the ambient light intensity and display it on the screen of CyberPi in real time.10.gif

Part 4   Practice

Find some tools such as a flashlight and a desk lamp to change the ambient light intensity, and see how the value changes!


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



Please sign in to leave a comment.