Connect to Controller:
(1) Click this icon
(2) Select the Mode
(3) Icon will turn Green once robot is detected.
Library User Guide
Requirement:
Controller: E6-RCU
** Connect LED to P7 for troubleshooting
1
Initialise (Speed)
Enter the Based Speed for your motor M1 and M2.
**NOTE:
(1) Robot need to always do Initialise for 1-time only at the beginning of program.
(2) Robot speed max at 70%.
2
Line Colour (Colour)
Enter the number 0 or 1 to change the Line Tracking colour detection.
0 : Black Line
1 : White Line
3
PID (Proportional, Integral, Derivative)
Configure the PID of the robot in order to run smoothly.
** The default value will be
Proportional : 0.2
Integral: 0
Derivative: 2
4
Stop_Display Encoder
Stop the robot and display All motor (M1, M2, M3, M4) encoder value on screen.
5
Line Follow_Junction (Speed, Junction)
Robot will follow the line and STOP at the next junction detected that matches the number input.
Speed: Robot Speed value
Junction:
1 - Line tracking no.1 detect junction
7 - Line tracking no.7 detect junction
17 - Line tracking no.1 & no.7 both detect junction.
6
Line Follow_Encoder (Speed, Encoder)
Robot will follow the line and STOP once the encoder is reached.
Speed: Robot Speed value
Encoder: Distance of robot movement in encoder value
**Note: the program using Encoder from M1 to calculate.
7
Turn Left / Turn Right
Robot Turn Left or Right.
8
Line Search (Speed, Left/Right)
Search back the line once the robot moves out of track. The robot will move 90 degrees left and right to search the line. If the line is not found, the robot will stop moving.
Speed: How fast the robot move when searching line. Suggest to use less than 50.
Left/Right: Start search from left or from right.
0: Start search from Left
1: Start search from Right
9
Robot Move_Encoder (Speed, Encoder)
Robot move Forward/Backward Straight (Without following the Line) until the encoder value reaches.
Speed: How fast the robot move forward/backward.
Positive +ve = Robot go Forward
Negative -ve = Robot go Backward
Encoder: Enter value to allow robot to run in certain distance.
10
Robot Rotate_Encoder (Speed, Encoder, Direction)
Robot Rotate Left/Right according to the encoder set. (Without following the Line)
Speed: How fast the robot move
Encoder: Enter the value for the robot to rotate. Eg: 480 - Robot turn 90 Degrees
Direction: Left/Right Rotate direction
0: Rotate to LEFT
1: Rotate to Right
EXAMPLE CODE
Example code of the robot stop at 2nd junction that detected by Line Tracking sensor no.7