Scratch on Raspberry Pi

Hi guys. This is my 100th post on my blog and I am pleased to write about… Scratch!

True, I did say that I wouldn’t do too much about Raspberry Pi, but I use Scratch on my Raspberry Pi. If you are not using Raspbian on your Pi, or you have Linux installed on a different computer, use your package manager to install the package scratch. (Example: on Debian use sudo apt-get install scratch at the terminal)

Installers for Windows, Mac OS X and Linux are found on scratch.mit.edu.

Once done, run Scratch and a small window will open. It will look a bit like this:

2016-10-08-092841_1184x624_scrot

Then click control and click Control, then drag the When flag clicked to the scripts. Then, click Looks and drag “Say Hello! for 2 seconds” to the scripts and it should connect to the When Flag clicked. Click on the Green flag. The cat should say Hello!

Now replace the When Flag clicked with When Space Key Pressed. Choose which key triggers the program and tap it.

2016-10-08-093248_1184x624_scrot

While this is a good example, it fails to show Scratch’s power.

Lets make the cat sprite move:

Delete the Hello stuff (just drag the code relating to Hello! back into where you got it from).

The code is shown below:

2016-10-08-093619_1184x624_scrot

Now lets add jumping:

2016-10-08-093747_1184x624_scrot

These examples are basic. More powerful examples can be found at scratch.mit.edu.

Epic Chas Gamer 😀

 

3 thoughts on “Scratch on Raspberry Pi

Go on, you know you want to! Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s