I need help with understand the Silicon Lab programming code for a SUMO BOT

Status
Not open for further replies.

o0tsubasa0o

New Member
I need help in understanding what the number (3 and 5)and the greater equal sign >= means in the code below. Can anyone help me out ? thx .

The code is a part of a SUMO BOT porgramming using Silicon Laboratories .

AI_Opto_FR : distance sensor Front Right
AI_Opto_FL : distance sensor Front Left
AI_Opto_Frnt : distance sensor Front
AI_Opto_SFL : distance sensor Side Front Left
AI_Opto_SFL : distance sensor Side Back Left
AI_Opto_BK : distance sensor Back

wait_ms(EnemyChkTm);
if ((AI_Opto_FR >= 3 && AI_Opto_FL >= 3 ) || (AI_Opto_FR >= 3 && DI_Opto_Frnt) || (AI_Opto_FL >= 3 && DI_Opto_Frnt) || AI_Opto_SFL >= 5 || AI_Opto_SBL >= 5 || DI_Opto_Bk)
{
MOVE(15,15);
wait_ms(StopTm);
Enemy_Locked = 1;
break;
}
}
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…