Monday, January 19, 2015

WeDo & Scratch: Wild Animals I

We have talked before about how to program a few basic things, like the fundamentals for the motor and the different alternatives to turn in on and off. Last time we started talking about different options for programming the Amazing Mechanisms included with the WeDo software: Dancing Birds, the Smart Spinner and the Drumming Monkey, and how to do it using Scratch. This time we continue with the next set of 3 mechanisms: the Hungry Alligator, the Roaring Lion and the Flapping Bird (the designs 4, 5 and 6 from the figure below.

Hemos hablado de algunas cosillas y programado lo más básico con el motor y diferentes opciones para activarlo. También iniciamos explicando diferentes opciones de programación con los Mecanismos Asombrosos: Los Pájaros Bailarines, La Peonza Inteligente y el Mono Tamborilero. Hoy continuamos con el siguiente set de 3 mecanismos con las actividades de los Animales Salvajes: Caimán Hambriento, el León Rugiente y el Pájaro Volador (los modelos 4, 5 y 6 en la figura).



Let’s start with the Hungry Alligator. The WeDo software program begins when hitting the letter “A” on the keyboard to turn the motor one way to open the powerful jaws of 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 find the “when __ key pressed” and selected a letter on the drop down menu. The letter “a” was selected for this example.
Iniciemos con el Caimán Hambriento. El programa inicial con el software del WeDo consiste en pulsar la letra “A” en el teclado, hacer girar el motor en una dirección para abrir las poderosas mandíbulas del caimán, producir un sonido mordelón, para inmediatamente girar el motor en la dirección contraria y cerrar esas fauces peligrosas, esperar unos segundos y detener el motor. En la siguiente imagen de programación en WeDo se muestra esta secuencia.

En Scratch se puede programar de forma similar. Al utilizar la opción de “al presionar tecla” bajo el menú de Control y seleccionar una letra, “a” en este ejemplo.





You can select the space bar since you don’t have to look at the keyboard constantly to find it. You need to use the “motor direction” to open the alligator jaws, after that the option “motor on for” 1 secons 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 look 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 on the Human folder. You may choose a different one, download it form the Internet or even record your own version. Don’t forget to chose the sound from the drop down menu, otherwise your alligator will sound like a kitten. Once done, you need select the motor direction in the opposite way to see the jaws closing for chomping down whatever the fangs grab.

Puedes seleccionar la barra espaciadora ya no tienes que mirar al teclado. Utilizar la opción de “dirección del motor” para abrir las fauces del caimán, luego la opción de “motor encendido” por 1 segundo bajo el menú Movimiento. Después emplear la opción de “tocar sonido”, por defecto aparece el sonido de un maullido que no suena demasiado a caimán hambriento, pues es necesario importar uno más majestuoso para esta creación. Para ello, en la zona central de programación, en la pestaña de sonidos pulsar el botón de importar, buscar la opción de “Human” y seleccionar “Slurp” u otro de tu elección, hay muchos para escoger dentro de esos archivos. No olvidarse de seleccionarlo nuevamente en el menú desplegable de “tocar sonido”, sino ese caimán sonará muy gatuno. Después hay que girar el motor en la otra dirección para ver esos colmillos machacar la pobre víctima que ha caído bajo esos afilados colmillos.


It now comes 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 fierce beast, you need to configure 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 find a sleepy sound to show this cat is quite friendly when is tired, so we can get nearby without getting into trouble.

Performing the programming in Scratch shouldn’t be difficult for this task after all we have learned with the previous design. You need to verify and test several motor power levels for the lion to behave like the king of the jungle it is. We don’t want our robotic friend to fall appart while performing, isn’t it? The most difficult part for the Roaring Lion programming is finding a hungry lion sound. You can try your best impersonation to record this sound. You can be voice of your won creation! You can also resort to a sound file over the Internet of your liking if the ones on Scratch are not fierce enough.
Ahora viene el León Rugiente. Su programación en WeDo es como se muestra adelante. Con una tecla se levanta a rugir, y con la otra se acuesta a dormir. Cuando el león se levanta a rugir hay que configurar la potencia del motor, verificar que el motor gire en la dirección en que se levanta nuestro felino y colocar un sonido amenazador.

Cuando nuestro león se cansa de rugir, se tiene que ir a dormir. Para ello hay que programar la potencia del motor, verificar que el motor gira en la dirección correcta para que tenga dulces sueños y colocarle un sonido adormecedor para mostrar que nuestro felino está de mejor humor y así nos podemos acercar a el sin ningun problema.

En Scratch la programación es bastante similar a la imagen de abajo según se ha explicado antes. Siempre hay que verificar y probar diversos valores de potencia y tiempos de espera para que nuestro león se comporte como el rey de la selva. No queremos que nuestro robótico amigo se desarme en pleno funcionamiento. Para hacer nuestro programa en Scratch, lo más difícil es tener un sonido de león hambriento. Puedes grabar tu mejor personificación y darle tu voz a tu creación o buscar un sonido en internet que sea de tu agrado.




When going to sleep, our feline fried can be programmed in Scratch as shown below. You need to be really creative when choosing a sleeping sound. You can try between the ones available in the Scratch folder to see if there is something you like or you can try to record the best impersonation you can for this sleepy cat.


Para irse a dormir, nuestro felino podría programarse en Scratch como se muestra a continuación. Hay que ser muy creativos con el sonido de estar durmiendo. Puedes probar el que más te agrade dentro de la librería de Scratch o grabar tu mejor interpretación para este felino dormilón.


In order to complete the three designs from the Wild Animals set, we still need to work with the Flapping Bird. The Flapping Bird is a lot less complicated than previous designs. It only uses the tilt sensor to activate the wing flapping sound.

The basic WeDo program should look like the image below. We have a loop that allows to repeat the cycle as many times as needed. There is also the wait command connected with the tilt sensor. The tilt sensor is on the horizontal position (no tilt), so when is moed to another posotion it will activate the wind flapping sound for this huge bird. You can imagine this bird moving the powerful wings through the air. Is quite terrorific, isn’t it?

Working in Scratch, the program should look similar to the one found below. The “forever if” loop can be found under the Control menu. If you look under the Operators menu, you’ll find the equal to block “_=_”. You can play with the value to find another interesting configurations. Going through the Sensing menu, you’ll find close to the end the “sensor value” block. On that drop down menu, you will discover the tilt sensor like the one on the image.

Finding the right sound for the flapping of the wings for our big bird is a complete challenge for this creation too. You can try and record the sound effects for this design as well. You can also search on the Internet for the sound of your preference.
Para completar el trío de los Animales Salvajes, nos queda por analizar el Pájaro Volador. El Pájaro Volador es bastante menos complicado que los anteriores. Solo utiliza el sensor de inclinación para reproducir el sonido de batir las alas.

El programa básico en WeDo se debe ver como en la imagen de abajo. Tenemos un bucle que permita repetir el ciclo tantas veces como sea necesario. También está el comando de esperar por el sensor de inclinación en posición horizontal (detecta si es movido) para activar un amenzante sonido de nuestro majestuoso pájaro blandiendo sus poderosas alas. Puedes imaginarlo, debe ser terrorífico.

En Scratch, el programa puede lucir como el de abajo. En el menú de Control puedes encontrar el bucle de “repetir por siempre si”. Bajo el menú de Operadores encontrarás el bloque de igualdad “_=_”. Puedes jugar con el valor para encontar otros configuraciones para este programa. En el menú de Sensores encontrarás cercadel final el bloque del “valor del sensor”, en el menú desplegable encontrarás la opción de inclinar como en la imagen.

Igual que el caso anterior, encontrar el sonido adecuado para el batido de las alas de nuestra gran ave es un desafío. Puedes probar y grabar los efectos especiales para este diseño. También puedes encontrar en internet algún sonido de tu preferencia.


Enjoy, Subscribe and
Disfruta, Subscríbete y

No comments:

Post a Comment