
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
158
SO FAR IN
this book, you’ve learned a lot about how to use programs that other people have
written on your Raspberry Pi. The chief goal of the Raspberry Pi project is to get people writ-
ing their own programs, however—and not just adults. The Raspberry Pi Foundation is
working to get the device adopted as an educational tool for all age ranges.
A key requirement for reaching that goal is ensuring that young children can experience the
joy of creating their own software, rather than just consuming other people’s code. The secret
to this is
Scratch
.
Introducing Scratch
Created by the Lifelong Kindergarten group at the Massachusetts Institute of Technology
Media Lab in 2006 as an offshoot of the Squeak and Smalltalk languages, Scratch takes the
core concepts of programming and makes them accessible to all. Long-winded typing—tiring
and dull for younger children—is replaced with a simple jigsaw-like drag-and-drop environ-
ment, which nevertheless encourages programmatic thinking and introduces the core con-
cepts used by all programming languages.
Officially considered a program for ages eight and above, but accessible to even younger pro-
grammers with a little help and guidance, Scratch is deceptively powerful. Behind its colour-
ful and mouse-driven user interface is a programming language that includes impressive
multimedia functionality. It should come as no surprise then that, of the more than two-
and-a-half million Scratch projects shared by users of the software on the official website, the
majority are games.
Encouraging children to learn how to make their own games can be a great way of sneaking a
little learning into their playtimes. Scratch’s friendly user interface and excellent handling of
core concepts mean that children are unlikely to get frustrated by a sudden steep learning
curve. Better still, the concepts learned in Scratch offer an excellent foundation for progres-
sion to a more flexible language like Python (see Chapter 12, “An Introduction to Python”).
Even before moving on to another language, Scratch offers more than just a framework for
games. It can be used to create interactive presentations and cartoons, as well as interfaces
with external sensors and motors through the use of add-on hardware such as the PicoBoard
and the LEGO WeDo robotics kit.
The recommended Raspbian distribution for the Raspberry Pi comes with the latest version
of the Scratch development environment pre-loaded, so if you’ve been following the recom-
mendations throughout this book you’re ready to start. If you’re using a different operating
system, visit the official Scratch website at
http://scratch.mit.edu
to download the
software—and you can find versions for Windows and Apple’s OS X in the same place.
Summary of Contents for A
Page 1: ......
Page 2: ......
Page 3: ...Raspberry Pi User Guide 2nd Edition...
Page 4: ......
Page 5: ...Raspberry Pi User Guide 2nd Edition Eben Upton and Gareth Halfacree...
Page 10: ......
Page 26: ...R A S P B E R R Y P I U S E R G U I D E S E C O N D E D I T I O N 10...
Page 28: ......
Page 29: ...Chapter 1 Meet the Raspberry Pi...
Page 37: ...Chapter 2 Getting Started with the Raspberry Pi...
Page 56: ......
Page 57: ...Chapter 3 Linux System Administration...
Page 79: ...Chapter 4 Troubleshooting...
Page 89: ...Chapter 5 Network Configuration...
Page 109: ...Chapter 6 The Raspberry Pi Software Configuration Tool...
Page 122: ......
Page 123: ...Chapter 7 Advanced Raspberry Pi Configuration...
Page 140: ......
Page 141: ...Chapter 8 The Pi as a Home Theatre PC...
Page 151: ...Chapter 9 The Pi as a Productivity Machine...
Page 160: ......
Page 161: ...Chapter 10 The Pi as a Web Server...
Page 172: ......
Page 173: ...Chapter 11 An Introduction to Scratch...
Page 189: ...Chapter 12 An Introduction to Python...
Page 216: ......
Page 218: ......
Page 219: ...Chapter 13 Learning to Hack Hardware...
Page 234: ......
Page 235: ...Chapter 14 The GPIO Port...
Page 249: ...Chapter 15 The Raspberry Pi Camera Module...
Page 265: ...Chapter 16 Add on Boards...
Page 280: ......
Page 281: ...Appendix A Python Recipes...
Page 287: ...Appendix B Raspberry Pi Camera Module Quick Reference...
Page 293: ...Appendix C HDMI Display Modes...