• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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

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;
}
}
 

EE World Online Articles

Loading

 
Top