60
Let’s start with the Hungry Alligator. The WeDo software
program begins when hitting the letter “A” on the keyboard
this alligator. After that, it will make a scary bite sound and
immediately turn the motor the other way to close the jaws
and bite everything that gets close enough. It will chomp for a
few seconds before the next bite. The next image shows this
sequence programmed in WeDo.
You can program it in Scratch in a similar fashion. You need to
look for the Control tab to nd the “when __ key pressed” and
selected a letter on the drop down menu. The letter “a” was
selected for this example.
You can select the space bar since you don’t have to look at
the keyboard constantly to nd it. You need to use the “motor
direction” to open the alligator jaws, after that the option “motor
on for” 1 second under the Motion menu. Next, you need to
select the option “play sound”. By default the meow sound
appears, you may want to change it since it doesn’t sound
ferocious enough for a hungry alligator. So, you need to import
a new sound for this task. You need to go to the zone where
you are programming, look for the Sounds tab, hit the Import
button, and look around for a suitable sound. I used the one
called Slurp in the Human folder. You may choose a different
one, download it from the Internet or even record your own
version. Don’t forget to choose the sound from the drop down
done, you need to select the motor direction in the opposite
way to see the jaws closing for chomping down whatever the
fangs caught.
We can start thinking about having our own robotic security
system using LEGO® bricks. What if you have a wolf or huge
bear as a guardian for your home, built completely with LEGO
and programmed to behave as you like? It seems like world
domination is one step closer!
Next is the Roaring Lion design. The programming in WeDo is
as shown below. One key is used to get it up and roaring and
another to send it to sleep. When the big cat is up and roaring
like a erce beast, you need to congure the power level of the
motor and check the motor is turning the right way. Don’t forget
to add a ferocious sound for this feline.
When our big cat is tired of roaring, it needs to go for a good
night’s sleep. For that, you need to program the motor power
and check if the motor is turning in the right direction for the
lion to go to rest. You also need to nd a sleepy sound to show
this cat is quite friendly when it is tired, so we can get close
without getting into trouble.