This document shows you how to get started programming your Marty v2 with Scratch

What is Scratch?

Scratch is a block-based visual programming language and online community targeted primarily at children. In computing, a visual programming language is a language that lets users create programmes with visual expressions and symbols rather than text. It’s like making a jigsaw puzzle out of a string of commands.

You can programme your own interactive stories, games and animations and then share these with the online community. Scratch also helps young people learn to think creatively, reason systemically and work collaboratively.

Who can use Scratch?

Scratch is suitable for mixed ability classes and does not require any prior knowledge of programming. It is designed especially for ages 8 to 16, but can be used by people of all ages. Scratch has been designed so children can learn through exploring, experimenting and tinkering. This allows children to learn independently, freeing up parent or teacher time so they can get on with other tasks or work with another child.

How do I access Scratch?

In our App simply click on the Scratch button after scanning for and connecting to your Marty V2.

Download the Marty the Robot app here: (for Apple Devices) (for Android Devices)

What will I see in Scratch?

When you open Scratch you will see the User interface, you will have the following on your screen:

Sprites are the images that appear on the computer programme screen, in our app you will see there is a little cartoon Marty or the Scratch Cat Sprite as shown below.

Costume is one of the many different appearances of a sprite. These can be named, created, and deleted. Every Sprite must have a costume.

Backdrop is an image that can be shown in the backdrop on the stage you see the sprite on.

The Stage area features your sprite and any background you have chosen for it.

Scripts are collections of blocks that all interlock with each other. Each block will determine how Marty or the sprites interact with each other and the backdrop.

Coding Area: we highlighted this with a red box in this image. This is the place where you can assemble your code by dragging the blocks on the left into this area.

Blocks palette: this is an area of the Scratch User Interface that is located to the left of the Code Area. The block to choose from change depending on which circle you select on the left e.g. ‘Motion’, ‘Looks’, ‘Sound’ or ‘Events’.

Command blocks: these are the different instructions or 'commands' you can give, these are what you use to code in scratch.

Types Of Command Blocks

The types of blocks available to use in Scratch are broken down into nine varieties of blocks as follows:

Motion: These blocks relate to way in which Marty or the sprite will move. You can add in different commands that allow you to move your Marty and sprites, change angles and positions. It's Important To Remember that only the green blocks with Marty's face on them will make the real, robot Marty move, the other motion blocks will make your sprite move.

Looks: Commands in this section allow you to control the visuals of the sprite. You can change the costume, backdrop, size of the sprite and more.

Sound: These blocks will allow you to add sounds to your programme, either from Marty's inbuilt speaker or from the speaker in your device. You can add sound effects and change the volume and pitch.

Events: You can use this part to trigger different commands. For instance, when the green flag above the stage in Scratch is clicked the code attached to the 'when green flag clicked' event block will be triggered and start to run. Alternatively, an event could be ‘when the backdrop switches to Backdrop2 change the loudness of the sound to 10’. This means, the background will change and the sound will increase on a certain command.

Control: Allows you to add conditionals and loops. A conditional is something that is either true or false, this means the conditional block will only run if the condition is true. A loop allows you to repeat some of your code e.g. you can add a Marty motion and Marty sound block and then add a loop to ensure this is repeated as many times as you'd like or until something else happens in your programme!

Sensing: Gives your Marty or your sprite the ability to interact with the surroundings. You can use these to help Marty avoid obstacles, stay on the table, shake hands or react to light or noise if you have those add-on sensors. For sprites, this works in a similar way e.g. lets say you want to make a game where the goal is for two Sprites to never touch, you will need to write a script telling the programme this. Using the loop, can you use the ‘If’ statement to say that if Sprite1 touches Sprite2 then you must ‘Stop all’.

Operators: These handy green blocks are used to script math equations and can be used whenever you want to 'add', 'subtract', 'multiply', 'divide', wait until something 'equals' another or use 'less than'/'greater than' in your code e.g. when the distance sensor senses an object less than 50cm away then make Marty make the Confusion Sound.

Variables: These are the blocks used to hold values and strings (like your score or number of lives in a game). Variables allow for more complicated interactions. For instance, if you wanted to store the feedback on the amount of force on Marty's arm sensor and use that number to make Marty react when the force matches a finger placed onto it so that you could make Marty shake hands at the right moment, variables would help you achieve this.

My Blocks The primary purpose of these blocks is to make programming easier. They also give you functionality that isn’t built into the other Scratch blocks. For example, you could create a single block for your very own Marty dance. It lets you use one block that you’ve coded instead of a whole string of command blocks every time.