But can i ask, what is the "if(t==10)" and "t++;" for?
PHP Code:
while( true )
{
if(t==10) //if "time" variable is equal to 10 (minutes)
{
//do this
door1 rotateyaw(90,2);
door2 rotateyaw(-90,2);
break;
}
t++; //add a minute to "time" variable
wait 60; //waits 60 seconds and restarts the loop if t (time variable) is not 10
}
----------------------------------------------------
Hmm, i'm not sure what you mean with that, can you specify?
(thread)
thread: carries out a function independently of other functions
For example:
PHP Code:
blas1();
blas2();
blas3();
blas3(); will be carried out after the end of the blas2(); function, and this one will be carried out after the end of blas1();
PHP Code:
thread blas1();
thread blas2();
thread blas3();
blas1(); blas2(); blas3(); will carry out at the same time.