int
val
= 0;
analogWrite
(M1, 0);
analogWrite(E1,
analogWrite
(M2, 0);
analogWrite(E2,
delay(500);
irrecv.resume();
}
if
(results.value
execute the command in the following {}, here is the instruction to the left. */
int
val
= 150;
analogWrite
(M1, 0);
analogWrite(E1,
analogWrite
(E2, 0);
analogWrite(M2,
delay(500);/* Rotate 500ms to the left and stop, otherwise the car will always
be spinning around. */
analogWrite
(M1, 0);
analogWrite(E1,
analogWrite (M2
analogWrite(E2,
analogWrite(A1, 180);
irrecv.resume();
}
if
(results.value
right, execute the command in the following {}, here is the command to the right.
*/
int
val
= 150;
analogWrite
(E1, 0);
analogWrite(M1,
analogWrite
(M2, 0);
analogWrite(E2,
delay(500);
analogWrite
(M1, 0);
analogWrite(E1,
analogWrite
(M2, 0);
val);//the speed value of motorA is val
val);//the speed value of motorB is val
== left)
{/* Judgment on the received value, if the value is left,
val);//the speed value of motorA is val
val);//the speed value of motorB is val
0);//the speed value of motorA is 0
,0);
0);//the speed value of motorB is 0
== right)
{/* Judgment on the received value, if the value is
val);//the speed value of motorA is val
val);//the speed value of motorA is val
0);//the speed value of motorA is 0
86
Need help?
Do you have a question about the Hummer-Bot-1.0 and is the answer not in the manual?
Questions and answers