Raspberry Pi_Eng_23.4.6 Scratch & Robotics and Sensors

23.4.6 Robotics and Sensors

Scratch not only can handle the input and output to the program, but also it can connect to external hardware using the sensor board and robotics system. Thanks to its multi-threaded features and powerful messaging system between processes, Scratch can be used to create amazingly advanced robotics engines, and it will be very easy work to put Raspberry Pi in the heart of a simple robot.

Raspberry Pi_Eng_23.4.5 Explaining How to Write Scratch Program Using Example

23.4.5 Explaining How to Write Program Using Example

Here, we will explain the usage briefly with examples.

23.4.5.1 Moving [Cat] Sprite

The first time Scratch starts, there will be a “cat” in empty Stage. The “cat” is one of Sprites available in Scratch, [Cat] Sprite.

Raspberry Pi_Eng_23.4.4 Basics of Using Scratch Program

23.4.4 Basics of Using Program

23.4.4.1 Concept of Sprite

If a Sprite is defined in Sprite Area, it appears in Stage Area above it and performs various actions. It is like the main character or actor performing on the stage.

Raspberry Pi_Eng_23.4.3 Scratch Overview

23.4.3 Scratch Overview

When the program starts, the following screen appears. This screen is the main screen where you can create and test a necessary program.

Scratch interface

Figure 23‑6 Scratch overview

The screen consists of several main areas. Let’s look at each one.

Raspberry Pi_Eng_23.4.2 Starting Program of Scratch Language

23.4.2 Starting Program

You can start Scratch from desktop or Applications Menu as follows.

Scratch in applications menu

■ Executing Sctarch program in remote connection environment

Note that there is a case where it does not work normally on remote connection. I have searched the Internet for several sources, but the reason for this is still not clear.

Raspberry Pi_Eng_23.4.1 Features of Scratch Language

23.4 Scratch Language

23.4.1 Features

Scratch is a tool that allows you to create a program in drag-and-drop manner using a visual tool without writing complicated program source code. You can develop animation, interactive art works, game, and so on. While working with Scratch, you do not actually write program code, but you can learn important fundamentals and techniques of programming. It is therefore the best tool for those who are new to programming to understand the concepts of programming and to do various exercises

Raspberry Pi_Eng_23.3.1 Features of Sonic Pi

23.3 Sonic Pi

23.3.1 Features

Sonic Pi is a sound processing computer program. It is originally developed to support computer and music lessons at school, and it is a live coding synth that everyone can use for free. By making code with this, you can create and play classic and contemporary music styles, from Canons to Dubstep. Even if you want to make funky music like Daft Punk or Will.I.Am, but you do not know how to hold and play cello, you can do this without problems by using Sonic Pi.