Case 4 - mBot2 Rover senses the light intensity

Part 1 Objective

After you upload the program, mBot2 Rover's expression changes when the ambient light intensity is less than 10.

4-1.gif

Part 2 Preparation

  • Assembled mBot2 Rover × 1
  • USB cable (Type-C) × 1
  • Computer with network access × 1
Assemble mBot2 Rover, turn it on, and connect it to the computer by using the cable. Open mBlock 5 (PC client or web version), connect CyberPi, and select the Upload mode.

4-2.gif

1-3.gif

Part 3 Programming

Click + extension on mBlock 5, and add Display+.

4-4.gif

Write the following program, and upload it to CyberPi. Then you can put your finger on the light sensor to change mBot2 Rover's expression.

4-5.gif

Part 4 Practice

Try to make mBot2 Rover move around when the ambient light intensity is less than 10.
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.