MagPi58.pdf

(23140 KB) Pobierz
THE
OFFICIAL
RASPBERRY PI MAGAZINE
The official Raspberry Pi magazine
Issue 58
June 2017
raspberrypi.org/magpi
BUILD A WEB SERVER
Step-by-step guide to
running a simple server
DEVELOP A GAME
Learn code the fun way
by designing games
maker guide
Incredible ideas for projects to hack, code & make
MAKE A MUSIC BOX
Build a hands-free
theremin music synth
HACK YOUR LIGHTS
Install weather-responsive
lighting for your home
Also inside:
>
ZX SPECTRUM REBOOTED WITH RASPBERRY PI
>
MAKE A HARRY POTTER-STYLE MAGIC NEWSPAPER
>
REVIEWED: JOY BONNET POCKET GAME SYSTEM
>
NEVER FORGET WITH A PI ZERO CALENDAR DEVICE
Design dazzling
devices with Google
Cloud Speech API
AIY PROJECTS
9 772051 998001
BRILLIANT
Issue 58
Jun 2017
£5.99
06
THE
ONLY
MONTHLY MAGAZINE WRITTEN BY AND FOR THE PI COMMUNITY
Welcome
WELCOME TO
THE OFFICIAL
MAGAZINE
D
igital makers are the most creative,
industrious and innovative group of
people in the world.
What other group builds chess robots,
weather-responsive lights, or looks at the
magical newspaper in Harry Potter and thinks:
‘I could make that!’
Life is about what you build, craft, and create.
Minecraft is a lovely creation, but the version
for Raspberry Pi is special. Only Minecraft Pi
allows makers to hack and code it.
Minecraft Pi is digital making on a virtual
level. We recommend it to everybody, and this
month we have a massive feature on making
with Minecraft.
This issue is special for me. I’m taking over as
editor for
The MagPi.
It’s a huge responsibility,
and I’m tremendously grateful.
The MagPi
is a rare publication. A community
magazine that is loved by a small band of
makers, but big enough to shake the tech world.
Despite its huge success,
The MagPi
remains
a community mag. It’s your publication. So tell
me what you love, and like, and want to see.
Remember to make things. And don’t forget
to share with the community.
PAGE 3
2
SEE PAGE 32 FOR DETAILS
THIS MONTH:
16
MINECRAFT MAKER GUIDE
40
BUILD A WEB SERVER
50
DEVELOP A GAME
Hack and code Minecraft Pi to create your own world
Use a Raspberry Pi to run your own web services from home
Lucy Hattersley
Editor – The MagPi
lucy@raspberrypi.org
Create a ball-popping puzzle game in Python
66
BRILLIANT AIY PROJECTS
Start making things with your AIY Projects kit
FIND US ONLINE
raspberrypi.org/magpi
EDITORIAL
DESIGN
GET IN TOUCH
magpi@raspberrypi.org
PUBLISHING
Editor:
Lucy Hattersley
Features Editor:
Rob Zwetsloot
Sub Editors:
Rachel Churcher
and Phil King
Critical Media:
criticalmedia.co.uk
Head of Design:
Dougal Matthews
Designers:
Lee Allen, Daiva Bumelyte,
and Mike Kay
Illustrator:
Sam Alder
For advertising & licensing:
Head of Publishing:
Russell Barnes
russell@raspberrypi.org
|
+44 (0)7904 766523
Publisher:
Liz Upton
CEO:
Eben Upton
DISTRIBUTION
Seymour Distribution Ltd
2 East Poultry Ave
London
EC1A 9PT |
+44 (0)207 429 4000
This magazine is printed on paper sourced from
sustainable forests and the printer operates an
environmental management system which has
been assessed as conforming to ISO 14001.
SUBSCRIPTIONS
CONTRIBUTORS
Select Publisher Services Ltd
PO Box 6337
Bournemouth
BH1 9EH |
+44 (0)1202 586 848
Alex Bate, Mike Cook, Richard Jarvis, Phil King, Simon
Long, Joshua Lowe, Mehdi Imani Masouleh, Opemipo
Ogunkola , KG Orphanides, Les Pounder, Matt
Richardson, Marc Scott, Richard Smedley, Lorraine
Underwood, John M. Wargo, Clive Webster
The MagPi magazine is published by Raspberry Pi (Trading) Ltd., 30 Station Road, Cambridge, CB1 2JH. The publisher,
editor, and contributors accept no responsibility in respect of any omissions or errors relating to goods, products or services
referred to or advertised in the magazine. Except where otherwise noted, content in this magazine is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0). ISSN: 2051-9982.
raspberrypi.org/magpi
June 2016
April 2017
3
Contents
Issue 58 June 2017
raspberrypi.org/magpi
TUTORIALS
>
PI 101: BUILD A FILE SERVER
Use a Raspberry Pi as a mini home server
COVER FEATURE
38
>
PI 101: BUILD AN HTML SERVER
40
Upgrade your Pi home server to run websites
>
GET STARTED WITH GUIS
Set up a graphical interface using Python
42
46
48
50
52
54
60
62
>
MAKE A THEREMIN
Create a space-age electronic instrument
>
LIGHT UP YOUR STAIRS
Turn your stairs into a colourful thermometer
>
CREATE THE SAME GAME
The Same Game is simple. Make it yourself!
16
>
PI ZERO REMINDER
Use a Pi Zero to create a calendar alert system
>
BUILD A HEXOME SYNTH
Make a synthesizer for polyrhythmic music
>
INTRO TO C PART 12:
USING HEADER FILES
Learn all about header files and the preprocessor
MINECRAFT
MAKES
AIY KIT
PIONEERS
>
MAKE A SCRATCH CHAT BOT
Chat with your computer with this Scratch tutorial
IN THE NEWS
PI ZERO W SALES
250,000 Pi Zero W boards sold so far
7
A lot of you enjoyed our
voice kit last month!
6
Make it outdoors with
the new challenge
10
4
June 2017
raspberrypi.org/magpi
Contents
THE BIG FEATURE
POCO ZERO INTERVIEW
Grant Sinclair tells us about his new project
88
06
64
82
98
AIY PROJECTS FOR MAKERS
More projects to build with last month’s AIY Projects kit
66
REGULARS
>
NEWS
>
TECHNICAL FAQ
>
BOOK REVIEWS
>
FINAL WORD
YOUR PROJECTS
COMMUNITY
>
THIS MONTH IN PI
A bumper four-page look at the past month
84
90
92
94
96
>
COMMUNITY SPOTLIGHT
Dr Lucy Rogers puts down her robots and talks to us
>
CODE CLUB OF THE MONTH
A unique Code Club and some Jam highlights
34
>
EVENTS
Find an event near you to attend this month!
>
LETTERS
We answer your emails, posts, and snail mail
RASPBERRY TURK
A chess-playing robot with a Raspberry Pi hidden inside
REVIEWS
>
JOY BONNET
>
PI DRIVE NODE ZERO
>
TOUCH PHAT
June 2017
 
DAILY PROPHET
The magical newspaper from Harry Potter
comes to life in this project
36
76
78
80
5
raspberrypi.org/magpi
Zgłoś jeśli naruszono regulamin