ניכנסתי לאשכול של קטעי הקוד וראיתי שמישהו הכניס קטע קוד בשפת C
/*
search candle in room.
function need to be called when robot already in the room.
*/
int extinguish_fire(void)
{
/* go to fire */
while(!GetPort(white_line) && !GetPort(big_fire) && (GetPort(ir_front) < 33))
{
follow_wall_left_furniture();
if (GetPort(ir_front) < 28 )
turn90();
}/*end while*/
stop_motor();
fan_on(); /* built-in delay */
/* go to door */
turn180();
while(!GetPort(white_line) && (GetPort(ir_front)<47))
{
follow_wall_right_furniture();
if (GetPort(ir_front) < 28 )
turn090();
}/*end while*/
stop_motor();
}
אז היתי רוצה לשאול הוא יצר פונקציות בשמות: GetPort
follow_wall_left_furniture
stopmotor
turn
היתי רוצה לשאול איך בדיוק בונים את הפונקציות המקושרות לחומרה ולכרטיס שלי
ואיזה כרטיס בעצם יש את היציאה מהמחשב או איך זה פועל?