Download Final Report - Machine Intelligence Lab
Transcript
if(conf < 20) {
ColorDetected = FALSE;
}//if
if(conf >= 20) {
ColorDetected = TRUE;
break;
}//if
}//for
count++;
}//while
count = 0;
if(j == 0 && ColorDetected == FALSE) {
GossimaTurn(RIGHT);
ms_sleep(400);
GossimaStop();
}
if(ColorDetected == TRUE) {
break;
}
}//for
}// end
/*********************************************
*
*
Set camera tilt level
*
**********************************************/
void setCameraTilt(int level) {
switch(level) {
case 0: moveServo6(-60);
break;
//case 1: moveServo6(-80);
//
break;
case 1: moveServo6(-95);
break;
default: moveServo6(-95);
}
}
/*********************************************
*
*
Approach balls
*
18