EasyManua.ls Logo

Dobot AiStarter - 7.4 Setting Motor Speed; 7.5 Setting Motor Parameter; 7.6 Getting Motor Pose

Dobot AiStarter
41 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AiStarter User Guide 6AI-Starter Demo
IssueV1.0.32018-09-01 AiStarter User Guide Copyright © Yuejiang Technology Co., Ltd
25
AIStarter_SmartBotInit();
2) Detect color.
Program 6.11 Detect color
if(AIStarter_SmartBotGetColorSenor(COLORSENOR1,RCOLOR)
AIStarter_SmartBotGetColorSenor(COLORSENOR1,GCOLOR) > 30 &&
AIStarter_SmartBotGetColorSenor(COLORSENOR1,RCOLOR)
AIStarter_SmartBotGetColorSenor(COLORSENOR1,BCOLOR) > 30) {
colorState = RLINE;
}
3) AI-Starter executes different action according to different color status.
Program 6.12 Execute action
switch(colorState) {
case OTHERLINE:
//colorRec = false;
lineState = LINEPATROL;
break;
case RLINE:
delay(3000);
//colorRec = false;
lineState = LINEPATROL;
break;
case GLINE:
delay(3000);
//colorRec = false;
lineState = LINEPATROL;
break;
default:
break;
}
6.5 Cooperation Demo
6.5.1 Description
This demo realizes the coorperation of AI-Starter and Magician.
1) AI-Starter moves to the green line and then stops moving for one minute.

Table of Contents

Related product manuals