Figure 13. Add a switch and for Control, select Value.
For Type, select Logic. Attach a data wire from the result
of the compare block to the input of the switch.
Figure 15. On the True side of the new switch, add a move
block — full power backwards on B and C for 120 degrees.
This is what Eddie will do for loops 1-10.
Figure 14. On the False side of the new switch, add a move
block. Set B and C backwards full power in a full right turn for
240 degrees. This is what Eddie will do for loops 10-17.
Now that youve seen how to program Eddie for
Ultrasumo, here are a few ideas to take things further!
• Annoyed with having to change your light values
every time you show Eddie off at a new venue? Try
programming him to self-calibrate! Youll have to
record a value for dark and a value for light using
variables, and find the average to use as your
• Try rewriting the Ultrasumo program in a new way
that will have the same output.
• Create an attachment to hold 2 ultrasonic sensors
and program Eddie to follow his opponent!
Figure 16. Finally, on the dark side of our light sensor switch,
add a move block that sends Eddie forward at full power.
This month, we revisited Sumo and used an ultrasonic
sensor to improve our program. We used an array of loops,
switches, and mathematical operations to get our program
Next month, we’ll be exploring the compass sensor,
available from Hi Technic. Pick up a sensor or three from
their store at www.hitechnic.com and stay tuned for the
next installment of our NXT Big Thing! SV
46 SERVO 02.2011