Use Scratch 2.0 on Raspberry Pi

By Russell Barnes. Posted

Get access to the upgrade for Scratch on your Raspberry Pi via some very easy steps

Scratch is an amazing piece of software that has helped many people take their first steps into the world of coding. We’ve done a fair few Scratch tutorials ourselves on the Raspberry Pi, but they always use Scratch 1.4, which is installed on the Raspberry Pi itself.

Thanks to the recent updates to Raspbian with PIXEL, the official Raspberry Pi operating system, you can finally upgrade to the latest version of Scratch. It’s very easy to do as well, so get your Raspberry Pi out and let’s begin.

The full article can be found in The MagPi 51 and was written by Rob Zwetsloot.

STEP-01 Upgrade Raspbian

You’ll need to do this in one of two ways: upgrading from a previous install, or downloading the latest release of Raspbian with PIXEL and writing it to a new SD card.

To upgrade from an earlier version of Raspbian to Raspbian PIXEL, open up the terminal and type the following:

sudo apt-get update
sudo apt-get dist-upgrade

This may take a while and will probably require a reboot once you’re done. You’ll then be in the latest version of Raspbian with the PIXEL desktop.

STEP-02 Update your Raspberry Pi

The ability to use Scratch 2.0 is tied to the new browser, Chromium, being able to use Adobe Flash. This isn’t installed as standard with PIXEL, so you’ll need to update to get the Flash library. If you did a dist-upgrade to get PIXEL, then you may be able to skip this step. Otherwise, close Chromium if you have it open, go to the terminal, and enter the following:

sudo apt-get update
sudo apt-get upgrade

At some point during the upgrade process, you’ll be asked in the terminal window if you want to install Flash; just press ENTER to accept. Once everything is updated, you’re ready to go.

STEP-03 Find Scratch 2.0

Scratch 2.0 is not a program you can install on your Raspberry Pi, but instead is an online editor you can use through the Chromium browser. This is good, as it means you can use Scratch anywhere, taking your projects easily between computers. It also means your old Scratch projects for Scratch 1.4 on the Raspberry Pi will still work on that version installed on the Pi.

Open up the Chromium browser and head to the following address: scratch.mit.edu.

 You should be greeted by a page much like this

STEP-04 Browsing the website

From the main page, you can head straight to the editor by clicking the Create button at the top-left of the screen, or you can browse some examples if you want something more than just a blank canvas. There are also some games and programs that have been uploaded onto the website by other users to try out.

Once you click through to anything, though, you’ll need to right-click on the puzzle piece on the screen and then select ‘Run this plug-in’ for Flash to start working. It might take a moment to load the interface.

STEP-05 Make something

Scratch 2.0 works in mostly the same way as Scratch 1.4, although there are some extra features you can make use of. As before, you place blocks to create code with loops, variables, and triggers. You can also upload sprites and music from your computer if you want to use more than just the defaults available. You can then save your files to your Raspberry Pi by going to File and then ‘Download to your computer’.

You’ll also notice an ‘Upload from your computer’ option; this can be used to load the files you make in Scratch 2.0, and upload some of your Scratch 1.4 projects as well.

STEP-06 Compatibility

Scratch 2.0 projects can sometimes have a hard time working on the version of Scratch that’s installed on the Raspberry Pi. As long as you have an internet connection, it shouldn’t be a problem, as you can run them in the browser. If you want to convert the files to work offline in Scratch 1.4, you can try out the Retro Converter.

It’s not perfect, though, so you may need to make some tweaks once you’ve done the conversion to get it working properly on the older version of Scratch.

From The MagPi store

Subscribe

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.