
• If you do not hear any sound from the buzzer, make sure you have the
[https://www.pololu.com/docs/0J57/3.c]
configured correctly for your Arduino.
The ability to wander around while staying inside a sumo ring is enough to allow a Zumo to compete
as a basic sumo robot, but a more advanced robot might be able to detect its opponent and
drive toward it directly. As a next step, you might consider adding more sensors, such as
[https://www.pololu.com/category/189/proximity-sensors-and-range-finders]
, to allow the Zumo to find its
opponent instead of relying on luck to make contact.
7.c. Collision-detecting sumo robot
This example extends the
simple border-detecting sumo robot example
described in the previous section, making use of the accelerometer in the Zumo Shield’s
LSM303 3-axis compass module (described in section
) to detect collisions. With the
[https://www.pololu.com/docs/0J57/6]
installed, the sketch file can be
opened in Arduino by selecting
File > Examples > ZumoShield > SumoCollisionDetect
.
This program uses the X and Y components of the acceleration measured by the LSM303 to determine
when it has made contact with an adversary robot in a sumo competition. When it detects contact, the
Zumo speeds up, which should allow it to either more effectively push the opponent out of the ring or
to escape the opponent if it collided at an undesired angle (from the rear or side). To read more about
how this program works, please see the comments contained in
SumoCollisionDetect.ino
.
7.d. Line follower
This example program demonstrates how a Zumo with a
[https://www.pololu.com/product/1419]
can be programmed to follow lines and run a line-following course.
With the
[https://www.pololu.com/docs/0J57/6]
installed, the sketch file can
be opened in Arduino by selecting
File > Examples > ZumoShield > LineFollower
.
This line follower implementation is very similar to our line following example for the
[https://www.pololu.com/product/975]
, and the concepts and strategies involved are explained in detail in
of the
[https://www.pololu.com/docs/0J21]
7.e. Maze solver
This example program demonstrates how a Zumo with a
[https://www.pololu.com/product/1419]
can be programmed to solve a line maze. With the
[https://www.pololu.com/docs/0J57/6]
installed, the sketch file can be opened in Arduino
by selecting
File > Examples > ZumoShield > MazeSolver
.
This maze solver implementation is very similar to our maze solving example for the
Pololu Zumo Shield for Arduino User’s Guide
© 2001–2019 Pololu Corporation
7. Example sketches
Page 47 of 52