Page 1
User Guide AiStarter User Guide Issue:V1 Date:2018-12-26 ShenZhen Yuejiang Technology Co., Ltd.
Page 2
Even if follow this document or any other related instructions, Damages or losses will be happen in the using process, Dobot shall not be considered as a guarantee regarding to all security information contained in this document.
Page 3
Preface AiStarter User Guide Preface Purpose This manual describes the functions of the AiStart smart car, how to use the car and its API functions to help users quickly understand and use the car. Intended Audience This document is intended for: ...
Li-ion rechargeable battery of 18650 type is supported. Please keep an eye on the AiStarter when AiStarter works, to avoid motor stalling for a long time, which could damage the control board and motor of the AiStarter. 1.2 After-sales Service Terms 1.2.1...
Page 7
1Safety Precautions AiStarter User Guide The product is normal used within the specified warranty period and has any non-artificial performance failure. The valid purchase certificate, receipt and the number thereof are provided. If additional package, accessories or translation are needed, our company will charge a certain cost.
2. Introduction 2.1 Features AiStarter is a smart car aimed to education and competition. It is designed with no-soldering assembly technique, using brass stubs to fix control board, and ribbon cables to connect each board, of which the layer is clear. The control board is designed based on Arduino Mega2560,...
2Introduction AiStarter User Guide Part Number M4*6 Cross Round Head Screw 4PIN Ultrasonic Sensor Cable 6PIN Color Sensor Cable 8PIN Tracking Module Cable 6PIN Motor Cable USB Cable Acrylic Plate A Acrylic Plate B Cross Screwdriver User Guide 2.3 Technical Parameters Table 2.2 Technical Parameters...
LED module and so on, but also integrate infrared tracking interface, ultrasonic sensor interface, USB, Xbee, bluetooth, serial port and so on. The main control board of Aistarter, which is shown in Figure 3.1 presets two servo signal interfaces for user expansion.
User-defined User can set function in Mixly or Arduino IDE environment 3.1.4 The end of AiStarter controller integrates four LED indicators, as shown in Figure 3.1, the detail descriptions are shown in Table 3.2. Table 3.2 LED indicators description Color...
3mm to 500mm in front of AiStarter. 3.4 Color Sensor Two color sensors are built into the bottom of AiStarter, which can recognize the color on the ground to execute different task according to different color.
4.1 Mixly Installation Mixly is an open Arduino graphical programming software based on Google Blockly graphical programming frame. AiStarter adds wrapper function on Mixly, user can call wrapper function by building blocks and upload it to AiStarter to control AiStarter.
Figure 5.1 The page of Mixly NOTICE If you can not get the corresponding serial port of AiStarter when you open Mixly, please ensure the Arduino USB drive has been installed. If you still can not get serial port information after installing, please open Mixly as an administrator.
User can select example on the File > Examples > AiStarter page, click to upload example to AiStarter, which will make AiStarter work according to the example. You can also refer to API Function to upload program to AiStarter by calling API function, which will make AiStarter work according to the program.
5User Operation AiStarter User Guide Description This module is used to set direction and speed Parameter Direction: Ahead Back Turn left Turn right Speed: Set running speed. Value range: 0r/m – 100r/m Return None 5.3.2 Setting Direction\Speed\Time Table 5.2 Set direction\speed\time...
None 5.3.5 Detecting Barrier Table 5.5 Detect barrier Blockly Description This module is used to detect whether a barrier is exist in front of AiStarter, before calling this module, please start the corresponding sonar Paramater Obstacle position: Right front ...
5User Operation AiStarter User Guide Return Return detection distance 5.3.7 Detecting AiStarter Track Table 5.7 Detect AiStarter track Blockly Description This module is used to detect whether tracking line is black or white Paramater Select infrared tracking sensor ports: ...
5User Operation AiStarter User Guide 5.3.9 Getting Geomagnetic Angle Table 5.9 Get geomagnetic angle Blockly Description This module is used to get geomagnetic angle Paramater None Return Geomagnetic angle 5.3.10 Setting White Balance Table 5.10 Set white balance Blockly Description...
5User Operation AiStarter User Guide Color: Green Blue Return Return RGB value. Value range: 0 - 255 5.3.13 Detecting Color Table 5.13 Detect color Blockly Description This module is used to detect color Paramater Color sensor: Select the left color sensor or the right color sensor Color: ...
5User Operation AiStarter User Guide Table 5.15 Detect switch state Blockly Description This module is used to detect switch state Paramater Switch: Switch1 Switch2 Switch3 Switch state: Select switch state press or release Deturn Return 1: Status detected Retuen 0: No status detected 5.3.16...
6AI-Starter Demo AiStarter User Guide 6. AI-Starter Demo 6.1 Line Tracking Demo 6.1.1 Description This demo realizes that AI-Starter tracks line automatically on testing map. 6.1.2 Procedure Step 1 Turn on AI-Starter. Step 2 Press down the key start|stop, AI-Starter starts tracking line after buzzer beeps one time.
Page 25
6AI-Starter Demo AiStarter User Guide //calculate the car position offset for (int i = 0; i < IR_NUM; i++) { if (irstate & (1 << i)) { total += irPos[i]; irOffCnt++; if (irOffCnt) { readPos = total / irOffCnt; else { readPos = lastPos;...
6AI-Starter Demo AiStarter User Guide int speedOffset; //pid errorsum += error; if (errorsum > errorsumLimit) { errorsum = errorsumLimit; else if (errorsum < -errorsumLimit){ errorsum = -errorsumLimit; errorChange = error - lastError; speedOffset = kp * error + ki * errorsum + kd * errorChange;...
Page 27
6AI-Starter Demo AiStarter User Guide Program 6.4 Initialize AI-Starter AIStarter_SmartBotInit(); Put the ultrasonic sensor values into the array dis. Program 6.5 Save ultrasonic sensor values dis[0] = AIStarter_SmartBotGetSonar(SONAR1); dis[1] = AIStarter_SmartBotGetSonar(SONAR2); dis[2] = AIStarter_SmartBotGetSonar(SONAR3); Set turning mode according to the distance between obstacle and AI-Starter.
6AI-Starter Demo AiStarter User Guide AI-Starter turns around according to obstacle position. BACKRIGHT: turn right BACKLEFT: turn left AHEAD: go straight. Program 6.7 Turns around according to obstacle position switch(motorStatus){ case BACKRIGHT: AIStarter_SmartBotSetMotor(MOTORR,BACKSPEED); AIStarter_SmartBotSetMotor(MOTORL,BACKSPEED); delay(BACKTIME); AIStarter_SmartBotSetMotor(MOTORR,DIFSPEED); AIStarter_SmartBotSetMotor(MOTORL,FRONTSPEED);...
6AI-Starter Demo AiStarter User Guide 6.3.1 Description This demo realizes white balance calibration. 6.3.2 Procedure Step 1 Put AI-Starter on a piece of A4 paper. Step 2 Put down the key start|stop to calibrate white balance. 6.3.3 Code Description Initialize AI-Starter.
6AI-Starter Demo AiStarter User Guide 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...
6AI-Starter Demo AiStarter User Guide Magician Detects AI-Starter moves to the carring position by Pixy. Magician starts to grab cubes to AI-Starter. After one minute, AI-Starter finishes carrying, and then starts line tracking function. 6.5.2 Procedure AI-Starter Step 1 Press down the key start|stop, AI-Starter starts tracking line after the buzzer beeps one time.
Page 32
6AI-Starter Demo AiStarter User Guide AIStarter_SmartBotGetColorSenor(COLORSENOR1,RCOLOR) AIStarter_SmartBotGetColorSenor(COLORSENOR1,BCOLOR) > 30) { colorState = RLINE; 3) AI-Starter executes different action according to different color status. Program 6.15 Execute action switch(colorState) { case OTHERLINE: //colorRec = false; lineState = LINEPATROL; break; case RLINE: delay(3000);...
Page 33
6AI-Starter Demo AiStarter User Guide 2) Set AI-Starter carrying position. Program 6.17 Set carring position float trayPoint[4][3] = { {308.12, 25.92, 28}, {308.12, -15.92, 28}, {258.12, 25.92, 28}, {258.12, -15.92, 28} 3) Magician grabs cubes to AI-Starter. Program 6.18 Grab cude void AreaToAIStarter() for(uint8_t i=0;...
7API Function AiStarter User Guide 7. API Function 7.1 Initialization Table 7.1 Initialization Function AIStarter_SmartBotInit (); Description Initialization Paramater None Return None 7.2 Setting Direction and Speed Table 7.2 Set direction and speed Function AIStarter_SmartBotSetMovment (int dir, int speed) Description...
7API Function AiStarter User Guide LEFT speed: Set Duty Ratio. Value range: 0 – 255 time: Set running time (unit: s) Return None 7.4 Setting Motor Speed Table 7.4 Set motor speed Function AIStarter_SmartBotSetMotor (int port,int speed) Description Set motor speed...
7API Function AiStarter User Guide Table 7.10 Geomagnetic calibration Function void AIStarter_SmartBotSetCompassCalibration() Description Calibration method: Press down the left-most key after starting up, make AI-Starter rotate 360°around space axes X, Y, Z respectively, press down the left-most key once again to...
7API Function AiStarter User Guide Table 7.13 Detect color Function bool AIStarter_SmartBotDetColorSenor (int port, color) Description Detect color Paramater port:Color sensor enum{ COLORSENOR1, COLORSENOR2 color: Detect color enum{ RCOLOR, GCOLOR, BCOLOR, Return Return 1: Color detected Return 0: No color detected 7.16 Getting RGB Value...
7API Function AiStarter User Guide 7.17 Initializing Switch Function MobilePlatform_SmartBotSetKeyInit () Description Initiallize switch Paramater None Return None 7.18 Getting Switch Status Table 7.15 Get switch status Function AIStarter_SmartBotGetKeyValue (int key) Description Get switch status Paramater key: Select switch enum{...
7API Function AiStarter User Guide Return None 7.20 Getting Photosensitive Value Table 7.16 Get photosensitive value Function AIStarter_SmartBotGetLightAnalog () Description Get photosensitive value Paramater None Return Return photosensitive value 7.21 Setting Ultrasonic Threshold Function AIStarter_SmartBotSetSonarThreshold (int dis) Description ultrasonic threshold Paramater dis: Set threshold。( Unit: cm )
Need help?
Do you have a question about the AiStarter and is the answer not in the manual?
Questions and answers