615178
8
Verklein
Vergroot
Pagina terug
1/137
Pagina verder
Introduction
1
Notes:
®®
®®
The Raspberry Pi
Education Manual
1
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
2
The Raspberry Pi Education Manual
Contents
000
0. Introduction ............................................................................. 5
001
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
010
2. Greenfoot on the Raspberry Pi ..............................................
Coming soon!
011
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
000
001
010
011
3
100
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
101
5. GeoGebra: fun with maths! .....................................................
Coming soon!
110
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
111
7. What next? .......................................................................... 169
100
101
110
111
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!
4
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
5
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.
Notes:
Hello, Raspberry Pi users
Chapter 0
What is the Raspberry Pi?
The Raspberry Pi is a computer, very like the computers with which you’re
already familiar. It uses a different kind of processor, so you can’t install Microsoft
Windows on it. But you can install several versions of the Linux operating system
that look and feel very much like Windows. If you want to, you can use the
Raspberry Pi to surf the internet, send an email or write a letter using a word
processor. But you can also do so much more.
Easy to use but powerful, affordable and (as long as you’re careful) difcult to
break, the Raspberry Pi is the perfect tool for aspiring computer scientists. What
do we mean by computer science? We mean learning how computers work so you
can make them do what you want them to do, not what someone else thinks you
should do with them.
And who do we mean by computer scientists? We mean you. You may
finish this manual and decide you want to be next Tim Berners Lee, but even if you
don’t, we hope you have fun, learn something new and get a feel for how computers
work. Because no matter what you do in life, computers are bound to be part of it.
Introduction
6
Notes:
6
What am I going to learn?
This user manual is different. Don’t expect a dry-as-dust description of how
to plug things in or where to find your serial number. And you certainly won’t learn
how to create a spreadsheet or a presentation. That’s really not computer
science, it’s something else entirely.
Instead, think of this manual, along with your Raspberry Pi, as a
“computer science set”. Have you ever been given a chemistry set? With a
chemistry set, you can make lots of bangs, smells and odd-coloured goop to
learn all about elements, molecules and compounds.
We’re not going to make odd-coloured goop, but we will use experiments
to discover how to program a computer to create your own games and animations,
how to make graphics appear on screen just by typing in the right code (just like
the developers of your favourite games do), how to get a cat to do your maths
homework for you, and much more.
By doing all this, you will learn the basic principles of computer
science. And that’s your first step on the journey to becoming a real computer
programmer, a games developer, an über-hacker just like in the movies (only
cooler and staying strictly within the law) and many other things besides. Exactly
what, depends on you.
Who is this manual for?
When we wrote this manual, our aim was for it to be suitable for most people
of eight years and older. But that doesn’t mean it’s for eight year olds. This book
is for anyone and everyone who is curious to know more about computing and
creating computer programs. If you don’t have computer-programming experience
but you want to get some and you’re looking for a place to start, this is it.
We begin the manual with some relatively easy experiments in computer science.
Things then get progressively more challenging with each successive exercise.
Try to spend time with each experiment and, once you’ve got an exercise doing
what the manual says it should, feel free to change the code to see what happens:
its one of the best ways to learn.
Will I break it?
You cant break your Raspberry Pi by doing any of the experiments in this
book, but you might just surprise yourself with what you can achieve. You will be
working through and learning genuinely difficult but exciting concepts, and laying
the foundations for even more exciting discoveries in the future.
So, without further delay, have everyone in the room stand back: we’re going to do
computer science!
A beginner’s guide to Scratch
7
Scratch is visual programming environment. With it, you can create your
own animations, games and interactive art works. And, while you’re
doing that, you’ll learn some important principles and techniques of
programming without actually having to write your own code. It’s a
great way to get started. To find out more about Scratch, visit the web
address scratch.mit.edu
Notes:
How to use this guide
We have tried to make this guide as straightforward to use as possible. To help
you with the exercises in this chapter, we have already collected some little bits
and pieces you will need, such as backgrounds, costumes for sprites, sound
effects and complete examples of Scratch projects.
These can be found on the Raspberry Pi educational release SD card, in the folder
/usr/share/scratch/RPiScratch. Wherever you see the SD card icon in the margin,
that means we are referring to a file that can be found on your Raspberry Pi
SD card. Go take a look! They can also be downloaded from Google Drive at
http://goo.gl/MpHUv
A beginner’s guide to Scratch
Chapter 1
8

Hulp nodig? Stel uw vraag in het forum

Spelregels
1

Forum

Raspberry-Pi

Misbruik melden

Gebruikershandleiding.com neemt misbruik van zijn services uitermate serieus. U kunt hieronder aangeven waarom deze vraag ongepast is. Wij controleren de vraag en zonodig wordt deze verwijderd.

Product:

Bijvoorbeeld antisemitische inhoud, racistische inhoud, of materiaal dat gewelddadige fysieke handelingen tot gevolg kan hebben.

Bijvoorbeeld een creditcardnummer, een persoonlijk identificatienummer, of een geheim adres. E-mailadressen en volledige namen worden niet als privégegevens beschouwd.

Spelregels forum

Om tot zinvolle vragen te komen hanteren wij de volgende spelregels:

Belangrijk! Als er een antwoord wordt gegeven op uw vraag, dan is het voor de gever van het antwoord nuttig om te weten als u er wel (of niet) mee geholpen bent! Wij vragen u dus ook te reageren op een antwoord.

Belangrijk! Antwoorden worden ook per e-mail naar abonnees gestuurd. Laat uw emailadres achter op deze site, zodat u op de hoogte blijft. U krijgt dan ook andere vragen en antwoorden te zien.

Abonneren

Abonneer u voor het ontvangen van emails voor uw Raspberry Pi bij:


U ontvangt een email met instructies om u voor één of beide opties in te schrijven.


Ontvang uw handleiding per email

Vul uw emailadres in en ontvang de handleiding van Raspberry Pi in de taal/talen: Engels als bijlage per email.

De handleiding is 2,96 mb groot.

 

U ontvangt de handleiding per email binnen enkele minuten. Als u geen email heeft ontvangen, dan heeft u waarschijnlijk een verkeerd emailadres ingevuld of is uw mailbox te vol. Daarnaast kan het zijn dat uw internetprovider een maximum heeft aan de grootte per email. Omdat hier een handleiding wordt meegestuurd, kan het voorkomen dat de email groter is dan toegestaan bij uw provider.

Stel vragen via chat aan uw handleiding

Stel uw vraag over deze PDF

Andere handleiding(en) van Raspberry Pi

Raspberry Pi Snelstart handleiding - Nederlands - 14 pagina's

Raspberry Pi Gebruiksaanwijzing - Deutsch - 92 pagina's

Raspberry Pi Gebruiksaanwijzing - English - 152 pagina's


Uw handleiding is per email verstuurd. Controleer uw email

Als u niet binnen een kwartier uw email met handleiding ontvangen heeft, kan het zijn dat u een verkeerd emailadres heeft ingevuld of dat uw emailprovider een maximum grootte per email heeft ingesteld die kleiner is dan de grootte van de handleiding.

Er is een email naar u verstuurd om uw inschrijving definitief te maken.

Controleer uw email en volg de aanwijzingen op om uw inschrijving definitief te maken

U heeft geen emailadres opgegeven

Als u de handleiding per email wilt ontvangen, vul dan een geldig emailadres in.

Uw vraag is op deze pagina toegevoegd

Wilt u een email ontvangen bij een antwoord en/of nieuwe vragen? Vul dan hier uw emailadres in.



Info