Getting Started With Scratch

Scratch is an interactive programming language that lets you create animations, games, sounds, graphics and animated stories.

To start the scratch program go to menu -> programming -> scratch.

Making Felix Move

Make sure that you are in the motion_menu menu on the left hand side. Drag the move_10_steps block into the coding area on the right. Click on the move_10_steps block to make Felix move.

Well done you have programmed the cat to move 10 steps.

Lets Add Sound

Click on the sound_menu menu on the left. Drag the playdrum and attach it to the move_10_steps your code should now look like this code_block1

Click on the blocks and listen.

You can experiment by clicking on the drop down arrow and selecting a different drum sound.

Make Felix Dance

Go back to the motion_menu menu. Drag another move_10_steps block and attach it underneath the playdrum block. Click at the start of the 10 and add a minus (-) sign. Your code should now look like this code_block2

Click on the block of code and see what happens.

Go back to the sound_menu menu and add another playdrum block and attach it to the very bottom of your code block and pick a different drum sound. Your code should now look like this code_block3

Click on the block of code to run it.

Making The Code Repeat

Click on the control_menu menu. Drag a repeatblock block and drop it at the top of your code making it wrap around all the other blocks like this code_block4

Click on the block of code to run it. You should see the code run 10 times then stop.

Make Felix Talk

Click on the looks_menu menu. Click and drag a say_block block and place it below the repeat block of code you created earlier. Your code should now look like this code_block5

Click the code to see what happens.

Now move the say_block to the top of the repeat block of code. Now your code should look like this code_block6

Click on the code to see how it has changed.

Using The Green Flag

Click back to the control_menu menu. Drag the green_flag_clicked block and attach it at the top of your block of code. Your code should now look like this code_block7

Now click on the green_flag above Felix to run your code.

Lets Make Felix Change Colour

Click on the looks_menu menu. Click and drag change_colour block to the coding area. Your code should now look like this code_block8

Now click the to see what happens.

Using The Keyboard

Click on the control_menu menu. Click and drag the space_pressed block and attach it to the top of the change_colour block. Your code should now look like this code_block9

Now press the space bar.

Experiment by choosing different keys from the drop down menu.

Adding A Background

We are now going to add a background to the stage. To do this click on the stage_icon icon.Now click on the background tab at the top of the code area menu_1 next click on import menu_2 that will bring up folders. Double click on the indoors folder. Now choose a background that you like and double click on it.

Well done you have now created a new background.

Adding A New Sprite

Every object that is displayed ob the stage is called a sprite.

To create a new sprite click on one of the following icons:

create_own Create your own sprite.

from_file Choose sprite from file.

random Generates a random new sprite.

For now click on random

Well done you now have a new sprite to program.

You have just learned the basics of scratch. go and explore and make something cool.

That’s all for now.

Keep the Pi out of the cupboard and keep coding!