Latest Articles
Loading...
25 Mar 2015

Scratch is an interesting programming application which enables children as well as adults to create animations, games, even driven programming, simulations including many other interesting projects and experiments. The fact that Scratch is free to download and use is another advantage - download Scratch 2. The simple drag and drop controls blocks used in Scratch programming are quite easy for the children to build their own projects. Kids can get creative with scratch coding which enables them to come up with their own inventions too.

Using Scratch as our programming tool, we are going to see how to create a simple animation which responds to keyboard keys. You can notice the scratch dashboard is divided into three vertical panels (left, middle,right) which further is divided into two parts.
  • On the left panel, you can notice blocks of commands which can be applied to a character (called sprite thumbnail) by drag and drop to the middle panel under the "scripts" tab. 
  • The middle panel is where all the blocks which have been dragged and dropped from different categorization of left panel such as "Looks, Sound, Pen, Data, Events, Control, Sensing, Operators, and More blocks" can be seen. You can also import images and sounds using the "Import" tab seen on the middle panel.
  • On the third panel, we can see the sprite thumbnails that will make up our project.When you click or select a sprite thumbnail on the bottom right of the third panel, you can see all the scripts associated with the selected sprite on the middle panel of the screen. On the upper right area of the third panel, you can see the results of all your animations and so this part is called as "stage area".
So now using all these features we are going to create a simple animation to the default sprite thumbnail "Cat" by adding some sounds and background animation. You can change your sprite character by clicking on the New Sprite tab which has "Paint new sprite", "Choose new sprite from file" and "Get surprise sprite".

How to assign sounds to computer keyboard keys


1- Click on the sprite to which you are going to add the controls. Now, drag and drop the control "when (space) key pressed" from the left panel to the middle panel.

scratch programming

2- Let's Choose the default sound "play sound (meow)" from the bottom left panel and drag it to the middle panel.

scratch

3- You can notice that the blocks looks like a pieces of puzzles that can be snapped together for a particular control. Similarly you can snap blocks together using different controls as you build your projects. Right now, we will concentrating only on sounds and backgrounds.

scratch programming

4- Update your scripts by clicking on the "Green Flag" you see on the upper left of the Scratch. Also, it is important that you save your project.

scratch

5- Now, play your project. You can run your project from the Scratch dashboard or by clicking the television like symbol on the upper left corner "Switch to presentation mode". Whenever you press the space bar on your keyboard, the cat makes a meow sound.

Similarly you can add any number of controls for each key assigning different sounds for different keys of your keyboard. Instead of using the default "space" key, we can use any key from the keyboard by clicking on the down arrow seen on the control.

scratch programming

Also, instead of using the default sounds from the "Sounds" tab, you can import the sounds from the library.

scratch programming

I have chosen a sound from Electronic-> Peculiar from the library. You can see the chosen sound on the "Sounds" tab in the middle panel just below the default "meow" sound. The same is reflected on the left panel. ( notice the circled yellow).

scratch programming

Then, drag and drop the "play sound (Peculiar)" block on the middle panel to the respective control. The two blocks will snap together. Now, that we have assigned music to two different controls, update the green flag.

scratch programming

Result:
The result of the scripts will be that the corresponding sounds get played when space bar and right arrow key gets pressed on the keyboard. For the rest of the buttons in the keyboard, unless you assign sound to its respective control it will remain silent.

Notes:
Now time for your homework kids: Try adding more sounds to different letters in the keyboards and see how it works. If you are confident with this Part 1 of Scratch, proceed to Part 2 of Scratch Programming for Kids which explains how to add backgrounds.

And finally we are going to experiment our scripts using a special keyboard called "Makey Makey" which has the ability to make anything  around you into a control like your play dough or apples or bananas. The only criteria is that the things used as your keyboard should be little conductive in nature. It's time to get creative!



4 comments:

  1. Kids will definitely enjoy doing this.... (y)

    ReplyDelete
  2. Wow! Definitely an interesting software... Thanks for this post, Uma :)
    TC! keep smiling :)

    ReplyDelete
  3. this was the first language that i learnt before learning C and all .. and its a great start to visualize things and great learning curve too for kids..!

    ReplyDelete
  4. Yes, it's a perfect game to increase a programming logic.

    ReplyDelete

Thank You for visiting Momscribe.com !
Your contribution is greatly appreciated.
Please feel free to subscribe to this blog either by Email or any methods listed on the right side of this content.

நன்றி ! மீண்டும் வருகை தாருங்கள் :)