CAS Raspberry Pi Education Manual - Table of Contents

The Raspberry Pi

Education Manual

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Version 1.0 December 2012

0. Introduction..................................................................... 5
1. A beginner’s guide to Scratch............................................ 7
1.1 Scratch basics................................................................ 9
1.2 Moving sprites...............................................................15
1.3 Animation (loops)..........................................................18
1.4 Maths cat.....................................................................23
1.5 Artificial intelligence........................................................29
1.6 Control........................................................................35
1.7 Scratch games..............................................................44
What next?……………………………………………………………..50

2. Greenfoot on the Raspberry Pi……………………..Coming soon!

3. Experiments in Python....................................................72
3.1 Getting to grips with Python..........................................73
3.2 MasterPy.....................................................................86
3.3 Roman Numerals & data manipulation..............................89
3.4 Getting artistic.............................................................94
3.5 Simulations and games............................................... 100
3.6 Limited resources - memory & storage.......................... 106
3.7 Accessing the web - providing a weather forecast........... 108
This is only the beginning - where do we go from here?……. 111

4. Human-computer interfacing......................................... 113
4.1 Twitter..................................................................... 115
4.2 Email application........................................................ 116
4.3 Remote Procedure Call............................................... 118
4.4 Web applications....................................................... 120
4.5 General Purpose Input/Output (GPIO).......................... 125

5. GeoGebra: fun with maths!………………………. Coming soon!

6. The Linux Command Line............................................. 152
6.1 Commands are just programs..................................... 153
6.2 Command syntax and file structure.............................. 155
6.3 The superuser.......................................................... 161
6.4 Creating and destroying files and directories................. 163
6.5 Remote access to the Raspberry Pi............................. 166

7. What's next?........................................................... 169

Where are the Greenfoot and GeoGebra chapters?
The Greenfoot and GeoGebra chapters have been left out of this edition of the manual. These programs rely on software called a Java virtual machine, which is currently being optimised for the Raspberry Pi to improve performance. You can look forward to enjoying these chapters once we are happy that your user experience will be of the same high quality as the chapters themselves!

This manual was brought to you by…

This manual is a bit different. It was written entirely by unpaid volunteers, all of whom are keen to share their expertise and enthusiasm for computing with as many people as possible.

What all of these contributors have in common, apart from a youth spent mainly indoors in front of ZX Spectrums and Commodore 64s, is that they’re all members of the organisation Computing at School (CAS). To find out more about CAS and its work promoting the teaching of computer science, head over to http://www.computingatschool.org.uk

Manual Contributors

Introduction by Andrew Hague
A beginner’s guide to Scratch by Graham Hastings
Greenfoot on the Raspberry Pi by Michael Kölling
Experiments in Python by Andrew Hague
Human-computer interfacing by Ben Croston
GeoGebra: fun with maths! by Adrian Oldknow
The Linux Command Line by Brian Lockwood
Where next? by Clive Beale
Manual Production
Karl Wright, Robert Cruse and Paul Kingett of Publicis Blueprint
Digital Contributors
The following people offered contributions not covered in the manual, but available
online and on your SD card.
Scratch Pong by Bruce Nightingale
Caesar Cipher by Brian Starkey
Fly by Alan Holt
Special Thanks
Martin Richards (University of Cambridge)
Simon Humphreys (Computing at Schools)
Alex Bradbury (University of Cambridge/Raspberry Pi Foundation)
Liz Upton (Raspberry Pi Foundation)
Eben Upton (Raspberry Pi Foundation)

Introduction

Congratulations! You have in your possession a Raspberry Pi. A small but powerful computer designed to help you understand and explore the almost-magical world of computing. Use it wisely; it’s an object of great power.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License