1
SKILL
LEVEL
Ringo Educational Guide Rev04.1 ~ Plum Geek
Using Ringo’s Motors
If we can make both motors turn in the forward direction, then Ringo should move
forward. Let’s try this example and see what happens:
In this example, we use the command
Motors(200,200);
to set the left and
right motors to a speed of 200. This
makes Ringo start driving forward. Then
we tell his brain to wait one second with
delay(1000);
so he will drive forward for
one second. Then we set both of Ringo’s
motors to speed 0 with the command
Motors(0, 0);
which makes both motors
stop moving. Finally, the command
delay(3000);
makes Ringo wait for three
more seconds. After this final line of code,
the loop will repeat again from the start.
void loop(){
Motors(200, 200);
// set left and right motors to 200 speed
delay(1000);
// wait 1 second
Motors(0, 0);
// make both motors stop
delay(3000);
// wait 3 seconds
}
Forward Movement