
AiStarter User Guide
7API Function
IssueV1.0.3
(
2018-09-01
)
AiStarter User Guide
Copyright © Yuejiang Technology Co., Ltd
32
Paramater
port: Select ultrasonic sensor
enum
{
SONAR1,
SONAR2,
SONAR3
};
Return
1: Obstacle detected
0: No obstacles detected
7.10
Getting Infrared Sensor Data
Table 7.8 Get infrared sensor data
Function
int
AIStarter_SmartBotGetIRModuleValue (
int
port)
Description
Get infrared sensor data
Paramater
port: Select infrared sensor ports
enum
{
IR1,
IR2,
IR3,
IR4,
IR5,
IR6
};
Return
Return 1: Black line detected
Return 0: No black line detected
7.11
Getting Geomagnetic Angle
Table 7.9 Get geomagnetic angle
Function
float
AIStarter_SmartBotGetCompass ()
Description
Get geomagnetic angle
Paramater
None
Return
Return geomagnetic angle
7.12
Geomagnetic Calibration