4. Ring:bit Introduction of E-blocks

4.1. Add New Extensions


  • We’ll need to add a package of code to be able to use our ring:bit car.

  • Add new package by following below steps.

Step 1

  • Click on “Advanced” in the Code Drawer to see more code sections and look at the bottom of the Code Drawer for “ Extensions”.

../../_images/Zh5p3Zu.jpg

Step 2

  • Search for “ringbitcar” and click on the ring:bit car package to add it to your project. (As below picture)

../../_images/lScruzy.jpg

Step 3

  • Completed.

../../_images/ikmJKH8.jpg

4.2. Introduction


../../_images/GLRp8cK.jpg

  • Pre-coding, we need to use the block to name the left wheel and the right wheel.


../../_images/Xlg5Ow5.jpg

  • Above block is for the car goes straight at full speed.


../../_images/abEXhxg.jpg

  • Above block is for the car reverses at full speed.


../../_images/x2PMCwM.jpg

  • Above block is for the car turns left at full speed.


../../_images/GYcS0r4.jpg

  • Above block is for the car turns right at full speed.


../../_images/t0OMOyW.jpg

  • Above block is for the car brakes.


../../_images/oRWI7VS.jpg

  • Above block is for setting the rotate speed for the left wheel and the right wheel of the car.


../../_images/usA3YAi.jpg

  • This block can be used to judge the line follow status after you expands the line follow module.


../../_images/rH9jdAC.jpg

  • This block can be used to receive the ultrasonic’s distance after you expands the ultrasonic distance module.

—``

Program


4.3. Questions


4.4. More Information