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.
Click on “Advanced” in the Code Drawer to see more code sections and look at the bottom of the Code Drawer for “ Extensions”.
Search for “ringbitcar” and click on the ring:bit car package to add it to your project. (As below picture)
Pre-coding, we need to use the block to name the left wheel and the right wheel.
Above block is for the car goes straight at full speed.
Above block is for the car reverses at full speed.
Above block is for the car turns left at full speed.
Above block is for the car turns right at full speed.
Above block is for the car brakes.
Above block is for setting the rotate speed for the left wheel and the right wheel of the car.
This block can be used to judge the line follow status after you expands the line follow module.
This block can be used to receive the ultrasonic’s distance after you expands the ultrasonic distance module.