MagPi52.pdf

(24411 KB) Pobierz
YOUR
OFFICIAL
RASPBERRY PI MAGAZINE
The official Raspberry Pi magazine
MERRY
MAKES
Issue 52 December 2016
raspberrypi.org/magpi
CHRISTMAS
Get creative with four festive projects
AMIGA
Turn your Pi
into the ultimate
emulation station
POWER!
BEGINNER
ELECTRONICS
Get started with
prototyping on your Pi
BUILD A
DIY ALARM
CLOCK
Wake at dawn with
a sunrise alarm
GIVE YOUR
ROBOT BRAINS
How to add a wealth of
sensors to your Pi robot
Issue 52
Dec 2016
£5.99
12
THE
ONLY
PI MAGAZINE WRITTEN BY THE RASPBERRY PI COMMUNITY
9 772051 998001
Welcome
7th
bscribe by
DEC
2016
to
Su
WELCOME TO
THE OFFICIAL
MAGAZINE
can mean lots of different things for
lots of different people. For me it
means spending some quality time with my
family and keeping my kids entertained with
games and fun projects. We’ve done our best
to come up with some project ideas in our
Christmas issue, including a great way to turn
our Christmas tree cover into a blinky light
sensation. Grab some LEDs, a pair of scissors,
and turn to page 14 to get started.
If you’re new to electronics, we’ve got
you covered in our Raspberry Pi 101 tutorials
starting on page 40. It’s easier (and much
more fun) than you might think.
If you’re a bit old-school like me, you might
be interested in reliving the glory days of the
Amiga. Check out our expert guide starting
on page 58 to learn how to emulate one of the
greatest computers ever made on one of the
greatest computers ever made!
Enjoy the issue.
FRE
get your
E
P
in tim
I ZER
O
e
Chris
for
tmas
!
T
he holiday season is upon us and that
SEE PAGE 28 FOR DETAILS
THIS MONTH:
14
MERRY CHRISTMAS MAKES
Add some shiny blinking lights to this month’s cover!
Top-notch beginner advice for breadboards and GPIO Zero
40
GET STARTED WITH CIRCUITS
58
RELIVE THE GLORY DAYS
Emulate the Amiga, one of greatest computers ever made
Russell Barnes
Managing Editor
68
GIVE YOUR ROBOT BRAINS
Build on last month’s amazing robot to add sensors and smarts
FIND US ONLINE
raspberrypi.org/magpi
EDITORIAL
Managing Editor:
Russell Barnes
russell@raspberrypi.org
Features Editor:
Rob Zwetsloot
News Editor:
Lucy Hattersley
Sub Editors:
Laura Clay, Phil King, Lorna Lynch
GET IN TOUCH
magpi@raspberrypi.org
PUBLISHING
For advertising & licensing:
russell@raspberrypi.org +44 (0)7904 766523
Publisher:
Liz Upton
CEO:
Eben Upton
DESIGN
Critical Media:
criticalmedia.co.uk
Head of Design:
Dougal Matthews
Designers:
Lee Allen, Mike Kay
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, Henry Budden, Brian Corteil, Mike Cook,
Gareth Halfacree, James Hobro, Richard Hayler,
Phil King, Simon Long, K.G. Orphanides, William
Plappert, Matt Richardson &Richard Smedley
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
December 2016
April
3
Contents
Issue 52 Christmas 2016
raspberrypi.org/magpi
TUTORIALS
>
PI 101 – USE BREADBOARDS
Learn how to prototype circuits on a Raspberry Pi
COVER FEATURE
40
42
46
48
50
>
PI 101 – MASTER GPIO ZERO
Program your circuits with the powerful GPIO Zero
>
PI 101 – USE VNC VIEWER
Remotely connect to your Pi’s desktop
>
INTRODUCTION TO C PART 6
This month, split your code up into functions
>
MAKE A CHRISTMAS GAME
Create a game of sliders in the Pi Bakery
>
BUILD A SUNRISE ALARM CLOCK
56
Get up at dawn with this Pi-powered alarm
>
AMIGA EMULATION EXPLAINED
58
Get your retro gaming on by emulating this classic
14
>
PARALLEL PROGRAMMING
Perform multiple calculations at the same time
60
62
MAKER XMAS
THE
PIONEERS
EDUCATOR’S
MAGPI
>
MULTI-BOOT YOUR PI PART 1
Start building a multi-booting Raspberry Pi
IN THE NEWS
ASTRO PI AWARD
Pi’s own Dave Honess wins the Arthur
Clarke award for his work on Astro Pi!
12
Raspberry Pi’s new
initiative to get teens
into coding
6
A new MagPi
Educator’s Edition
is out now
11
4
December 2016
raspberrypi.org/magpi
Contents
THE BIG FEATURE
68
A PI CAP AND
A TUBE OF
ELECTRIC PAINT
94
SPY V. SPI
ROBOT SENSOR CHALLENGES
Add sensors to our robot from last issue to make it
able to compete in Pi Wars challenges
Young secret agents learn
to code in this fun game
86
06
64
82
96
YOUR PROJECTS
REGULARS
>
NEWS
>
TECHNICAL FAQ
>
BOOK REVIEWS
>
THE FINAL WORD
COMMUNITY
>
THIS MONTH IN PI
30
What else happened this month in the world of Pi?
84
88
90
92
>
COMMUNITY SPOTLIGHT
We talk to Alex Eames, the man behind RasPi.TV
SISYPHUS
One part table, one part work of art
>
EVENTS
Find a community event near you
>
LETTERS
We answer your letters about the magazine and Pi
IOT DOOR
A facial recognition door using Windows 10
34
REVIEWS
>
PI CAP
76
78
80
81
5
 
PI LOOM
Weaving has never been easier
36
>
DREMEL
>
SERVO KIT
>
RASPBERRY SWEETS
raspberrypi.org/magpi
December 2016
Zgłoś jeśli naruszono regulamin