Case 9 - Display Codey's postures

Part 1   Objective

After you upload the program, Codey's screen displays the angle Codey is tilted to the left or right in real time.

32.gif

Part 2   Preparation

  • Codey (robot controller) x 1

  • USB cable x 1

  • Computer with network access x 1

Connect Codey to the computer by using the USB cable, open mBlock 5 (PC client or web version), delete the default device, click +add, select Codey from the Device Library and then click Set as mostly used device in the upper left corner, click Connect, and select the Upload mode.

33.gif

34.gif

Part 3   Programming

Use the reset the ( ) rotation angle ° block and the rotation angle around y block in Sensing blocks and the show ( ) block in Looks blocks, and click Upload to display the angle Codey is tilted to the left or right.

35.gif

Part 4   Practice

  1. Try to make Codey play a specific sound when it is tilted to the left or right.

  2. Try to display the angle at which Codey is tilted forward or backward, or the angle at which Codey is rotated.

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

Comments

0 comments

Please sign in to leave a comment.