Download Print this page

Makeblock RGB Line Follower Quick Start Manual page 5

Advertisement

Figure 4: Meanings of RGB Line Follower Plug-in Coding Blocks
(2) Based on the default line following policy model
Left motor control value:left_motor_ctrl_value = car_speed + position_offset * Kp
Right motor control value:right_motor_ctrl_value = car_speed - position_offset * Kp
The mBot line following example program can be obtained, as shown in Figure 5.
Figure 5: RGB Line Follower plug-in line following program
Line Follower Sensor, 0-not
learn, 1-learning background
color, 2-learning track color
Parameter 1: the port of the main
board connected to the RGB Line
Follower;
Parameter 2: channel, any one can
be chosen when using one RGB
Line Follower.

Advertisement

loading