Scratch 2.0: all-new features for your Raspberry Pi

Scratch 2.0 is now available as an offline app for the Raspberry Pi! This new version of Scratch allows you to control the Pi’s GPIO (General Purpose Input and Output) pins, and offers a host of other exciting new features.
As with Scratch 1.4, Scratch 2.0 on the Raspberry Pi allows you to create code to control and respond to components connected to the Pi’s GPIO pins. 

Scratch 2.0 also allows the creation of custom blocks, allowing code to be encapsulated and used (possibly multiple times) in a project. 

Another feature of Scratch 2.0 is the addition of code blocks to allow easy interaction with a webcam or a microphone. 

Scratch 2.0 is available in the latest Raspbian release, under the ‘Programming’ menu. 


  1. Tomi Engdahl says:

    Hands-On: Flying Drones with Scratch

    For $100, the Tello drone is a great little flyer. I’d go as far as saying it is the best $100 drone I’ve ever seen. Normally I don’t suggest getting a drone with no GPS since the price on those has come down. But the Tello optical sensor does a great job of keeping the craft stable as long as there is enough light for it to see. In addition, the optical sensor works indoors unlike GPS.

    But if that was all there was to it, it probably wouldn’t warrant a Hackaday post. What piqued my interest was that you can program the thing using a PC. In particular, they use Scratch — the language built at MIT for young students. However, the API is usable from other languages with some work.

    Scratch, though, is just part of it. You also need to install nodejs and a few files from Ryze Tech

    A Simple Program

    I put together a quick little Scratch program. It just runs a simple pattern and adds some sound effects (from the PC, not the drone). I immediately discovered a gotcha.

    The blocks simply issue commands, but there is no feedback.

    You must give the drone time to execute each command. From Scratch, I didn’t see a way to wait for the response, so you simply have to guess how long something is going to take.

    Talking through this program: the drone takes off, moves forward in 3 spurts, rotates 180 degrees, then moves forward in 4 spurts. Then it backs up the last spurt and lands.

    This drone uses an optical sensor for position awareness. This is not GPS, it’s more like how an optical mouse sensor works.

    For those that do have experience with coding, you may want to investigate the non-Scratch bindings. There are other bindings to the API, like programming Tello using Go which we covered last month.

  2. Tomi Engdahl says:

    How I designed a game with Scratch

    “Make a Difference” is a simulation game created entirely from open source tools, code, and audio-visual content.


Leave a Comment

Your email address will not be published. Required fields are marked *