I need a description of what it does.
if( ! digitalRead(sensor1)) {
speed1 = frente;
speedv1=0;
} else {
speed1 = 0;
speedv1 = voltar;
}
I need a description of what it does.
if( ! digitalRead(sensor1)) {
speed1 = frente;
speedv1=0;
} else {
speed1 = 0;
speedv1 = voltar;
}
The ideal would be to see the context, but reading it gives to say:
digitalRead()
passing as an argument the value of the variable sensor1
. What she does we can not know. else
command will be executed. if
is a decision command. speed1
to be worth the value that is in the variable frente
at this moment and the variable speedv1
is worth 0. speed1
it will be worth 0 and speedv1
will be the same as voltar
at this moment.