Raspberry Pi A User Manual page 180

Hide thumbs Also See for Raspberry Pi A:
Table of Contents

Advertisement

164
This simple animation program can be extended in a variety of ways. Using the New Sprite
option just below the stage on the right side of the Scratch window allows the programmer to
add more sprites that can move and play sounds independently. Adding in the
from the first example—or the similar
than a speech bubble—allows for the creation of an animated comic strip.
More importantly, even this simple example teaches important programming concepts:
despite being a mere five blocks long, it covers sprite movement in positive and negative
distances, sound playback and the concept of delays in a program. To introduce yet another
concept—at the risk of driving yourself insane with repetitive noises—try adding a
ever
causing it to run through its list forever—or at least until the noise becomes too much and
you click the red stop button at the top of the stage!
Figure 11-6:
Adding an
infinite loop to
the simple
Scratch
animation
P A R T I I I
P R O G R A M M I N G W I T H T H E R A S P B E R R Y P I
block from the Control block palette (see Figure 11-6). This adds a loop to the program,
block, which creates a thought bubble rather
think
block
say
for-

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Raspberry Pi Raspberry Pi A

This manual is also suitable for:

Raspberry pi b

Table of Contents