Sunday, December 7, 2014

WeDo & Scratch: Amazing Mechanisms I

Long time no post about programming! We will be describing and comparing techniques using the WeDo software and Scratch. And what better approach than comparing the programming of Amazing Mechanisms: Dancing Birds, the Smart Spinner and the Drumming Monkey.

Tiempo sin escribir sobre programación! Estaremos describiendo y comparando técnicas usando el programa de WeDo y el de Scratch, y que mejor forma que compara la programación de los Mecanismos Asombrosos: los Pájaros Bailarines, la Peonza Inteligente y el Mono Tamborilero.
Let’s start with the Dancing Birds. The basic program consists just of turning on the motor. Although simple enough, there are a number of experiments that can be done with this design. Once built and programmed, the birds can rotate in different ways and music can be programmed for dancing as well.

A simple program keeps students focused on what happens when you change the pulleys or place the yellow rubber band in a different position. This is the combination used in the WeDo software.


Comencemos con Los Pájaros Bailarines. El programa básico consiste solamente en encender el motor para que este se mueva. Aunque bastante simple, se realizan varios experimentos para los pequeñines con este robot. Una vez construido y programado, las aves pueden rotar de diferentes formas  con música para bailar.

Un programa sencillo  mantiene a los estudiantes enfocados en que sucede cuando se cambian las diferentes piezas. El programa de abajo es como quedaría al ser realizado con el software de WeDo.



The second design to investigate is the Smart Spinner. This is a spinning top to be programmed with several clever options. The main objective of this model is to observe the spinning behavior when using different sizes of gears.

For the programming, the level of complexity increases for this one. We could use the previous code since we just need to activate the motor, but we also need to turn it off as well. What about adding a sound to let it know it is moving? What about using a sensor to stop the motor?

In WeDo software, in addition to the start and the motor block we need blocks for sound, wait time, for the sensor and to stop the motor. So the idea is that after the motor starts moving, it will play a sound and wait until we lift the handle to turn off the motor. The last part is done with the proximity sensor. The proximity sensor is used to detect when handle is far from the surface.

El segundo diseño a investigar es el de La Peonza Inteligente. Esta peonza o trompo puede ser programado con algunos extras.  El objetivo es observar el comportamiento de la peonza cuando se usan engranajes de diferente tamaño.

Para la programación, el nivel de complejidad aumenta. Se podría utilizar el código anterior para activar el motor, pero también hace falta apagarlo. También se le puede añadir sonido cuando se mueve y utilizar un sensor para apagar el motor.

En el software de WeDo, además del bloque de inicio y el del motor, hacen falta los bloques del sonido, tiempo de espera, el del sensor y el de parar el motor. La idea es que luego que el motor empiece a moverse, este haga un sonido y espere hasta levantar por el mango el diseño para apagarlo. La última parte se realiza con el sensor de proximidad. El sensor de proximidad se utiliza para detectar cuando la agarradera se aleja de la superficie donde se lanza la peonza. El código en WeDo se muestra abajo.
The Scratch code differs slightly. A “play sound” block is required (I used the rattle sound). This is found under the Sound menu. On the working area choose the Sounds tab to import a new sound. You have to navigate to the folder named Effects to found the Rattle sound, but you are free to choose from the huge variety. You need a “wait until” block from the Control menu and the “motor off” block. El código en Scratch es un poco diferente. Se requiere un bloque de “tocar sonido” (utilicé el que se llama rattle), este se encuentra bajo el menú de sonido. En el área de trabajo se escoge la pestaña de Sonidos para importar un nuevo sonido.  Es necesario navegar hasta el folder de Effects para encontrar el sonido de Rattle, pero puedes escoger el que prefieras. Es necesario utilizar el bloque de “esperar hasta que” en el menú de Control y el bloque de “motor apagado” en el menú de Movimiento.
To program the sensor to stop the motor is a bit tricky: you need a “_>_” block (greater than) found under the Operators menu and a “sensor value” block under the Sensing menu. You need to choose distance from the drop down menu for the “sensor value” block. Later you need to place it on the left side of the “_>_” block and type 50 on the right side. The code is shown below. Para programar el sensor para detener el motor es bastante engorroso: se necesita un bloque de “_>_” (mayor que) en el menu de Operadores y el bloque de “valor del sensor” bajo el menú de Sesnores.  Es necesario escoger el sensor de distancia en el menú desplegable del bloque del “valor del sensor”. Es necesario colocarlo en el lado izquierdo del bloque de  “_>_”, mientras que en el lado derecho se escribe 50.


The Drumming Monkey basic programming is quite simple; it is fairly similar to the first one. This creation uses the monkey arms as levers to hit the drums. You need to get creative for a nice set of drums. Usually a couple of paper or plastic cups produce the best sound. You need to play with the cams (the grey ovals) positions to get a rhythmic percussion. The basic program also consists of turning on the motor. The experiments are related to the change of positions of the cams. The code for the WeDo software is presented below.


La programación del mono tamborilero es bastante sencilla, es muy similar al primer programa descrito. Esta creación utiliza los brazos del mono como palancas para golpear los tambores. Hay que ser bien creativo para obtener unos tambores, muchas veces vasos de cartón o plástico producen el mejor sonido. En este diseño hay que jugar con las posiciones de las levas (los óvalos grises) para obtener una percusión rítmica. El programa básico también consiste en encender el motor. Los experimentos están relacionados con el cambio de posición de las levas. El código en el software de WeDo se presenta abajo.


Enjoy, Subscribe and
Disfruta, Subscríbete y

No comments:

Post a Comment