MagPi71.pdf

(35261 KB) Pobierz
BUY
IN PRINT
WORLDWIDE!
magpi.cc/store
ON RASPBERRY PI
Use Android Apps
Build Touchscreen Devices
Control Electronics
RUN ANDROID
MAKE YOUR OWN
OSCILLOSCOPE
Test voltage with
Raspberry Pi & Arduino
The official Raspberry Pi magazine
Issue 71
July 2018
raspberrypi.org/magpi
MAGIC: THE
GATHERING
CARD COUNTER
Using AI to evaluate cards
BUILD A
WILDLIFE CAMERA
Capture the critters in your garden
HERE COMES
THE SUN
Track the weather
with Raspberry Pi
ADD AI
TO YOUR PROJECTS
WITH
TENSORFLOW
magpi.cc/store
Welcome
WELCOME TO
THE OFFICIAL
MAGAZINE
for a long time. We’ve all used Google’s
mobile operating system, and the prospect
of having a Raspberry Pi running Android is just too
good to miss (page 16). The unofficial solution is a bit
‘creative’, but we think it’s tons of fun.
Speaking of creativity: the UK weather has always
been a bit bonkers, but lately it’s gone full-blown
bizarre. When it’s not blazing hot, it’s stormy,
or chilly, and only a few months back we were in
the depths of a bleak midwinter. We wouldn’t be
surprised by frogs at this rate.
So we are delighted to share Raspberry Pi’s new
Weather Station instructions (page 70). Building
your own weather station is an amazing summer
project, and the output is a perfect introduction to
measuring data.
We’ve also got some extra-neat projects this
month, including the Seeing Wand (page 30) and
the Magic: The Gathering card analysis machine
(page 34). Both use AI to push the Raspberry Pi
further than we thought possible. If you are getting
into AI, then don’t forget to install TensorFlow on a
Raspberry Pi (page 58).
There’s a lot to get stuck into this month, so let’s
get started.
PAGE 2
8
W
e’ve been waiting to go all in on Android
SEE PAGE 28 FOR DETAILS
THIS MONTH:
16
ANDROID ON RASPBERRY PI
Get Google’s OS up and running
44
BUILD AN OSCILLOSCOPE
Measure signal voltage with a Raspberry Pi
58
INSTALL TENSORFLOW
Get started with Google’s AI framework
Lucy Hattersley
Editor
70
MAKE A WEATHER STATION
Come rain or shine, you’ll know what’s up
FIND US ONLINE
raspberrypi.org/magpi
EDITORIAL
Editor:
Lucy Hattersley
lucy@raspberrypi.org
Features Editor:
Rob Zwetsloot
rob.zwetsloot@raspberrypi.org
Sub Editors:
Phil King and Jem Roberts
GET IN TOUCH
magpi@raspberrypi.org
PUBLISHING
For advertising & licensing:
Publishing Director:
Russell Barnes
russell@raspberrypi.org
|
+44 (0)7904 766523
Director of Communications:
Liz Upton
CEO:
Eben Upton
DESIGN
Critical Media:
criticalmedia.co.uk
Head of Design:
Dougal Matthews
Designers:
Mike Kay and Lee Allen
Illustrator:
Sam Alder
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
Raspberry Pi Press
Mann Enterprises, Unit E, Brocks
Business Centre, Haverhill, CB9 8QP
magpi.cc/subscribe
CONTRIBUTORS
Alex Bate, Brian Beuken, Jody Carter,
David Crookes, Richard Hayler, Nicola King,
Nik Rawlinson, Matt Richardson, Richard
Smedley, Mark Vanstone, 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
April 2016
July 2018
3
Contents
Issue 71 July 2018
raspberrypi.org/magpi
TUTORIALS
>
PI 101: REMOTE ACCESS VIA VNC
42
Connect to your Pi remotely using VNC
COVER FEATURE
44
52
58
60
64
>
BUILD AN OSCILLOSCOPE
Use a Raspberry Pi and Arduino to make your own
>
LEARN PYGAME ZERO: PART 1
Making games is easy with Pygame Zero
>
USE AI WITH TENSORFLOW
Google’s AI functions work on Raspberry Pi
>
MAKE GAMES IN C PART 7
Learn how to build maps with your game elements
>
TAKE NATURE PHOTOS
Build a wildlife trap to snap some critters
16
IN THE NEWS
ANDROID ON PI
PI GLIDER
POWERED UP NES
MOONHACK
Reverse-emulating an NES console
08
Break another record!
10
A novel high-altitude craft
12
Some of the tools and techniques shown in The MagPi magazine are dangerous unless used with skill, experience, and appropriate personal protection equipment. While we
attempt to guide the reader, ultimately you are responsible for your own safety and understanding the limits of yourself and your equipment. Children should be supervised.
Raspberry Pi (Trading) Ltd does not accept responsibility for any injuries, damage to equipment, or costs incurred from projects, tutorials or suggestions in The MagPi
magazine. Laws and regulations covering many of the topics in The MagPi magazine are different between countries, and are always subject to change. You are responsible
for understanding the requirements in your jurisdiction and ensuring that you comply with them. Some manufacturers place limits on the use of their hardware which some
projects or suggestions in The MagPi magazine may go beyond. It is your responsibility to understand the manufacturer’s limits.
4
July 2018
raspberrypi.org/magpi
Contents
THE BIG
FEATURE
ASTROBOX
TOUCH
&
GATEWAY
WEATHER STATION
70
Build a Pi-powered weather station
YOUR PROJECTS
We’ve got four AstroBox kits up for grabs
to control your 3D printer from anywhere!
97
REGULARS
>
NEWS
>
TECHNICAL FAQ
>
BOOK REVIEWS
>
FINAL WORD
30
SEEING WAND
Using Microsoft’s AI tools, it will tell you what’s ahead of you
06
68
84
98
COMMUNITY
>
THE MONTH IN RASPBERRY PI
86
Translate some resources this month
GHOST CHESS
A spooky chess game with a haunted Pi
32
34
>
BRIAN CORTEIL PROFILE
We talk to one of the top UK Pi robot makers
90
92
94
 
CARD APPRAISAL
>
EVENTS
What events are happening this month
Find out how much your trading cards are worth
>
YOUR LETTERS
MYHOUSE
An automated doll’s house
36
Excellent answers to wonderful questions
 
VOMIT COMIC ROBOT
Print out randomly generated comics
38
REVIEWS
>
YETIBORG V2
>
PI-HOLE
80
82
July 2018
5
raspberrypi.org/magpi
Zgłoś jeśli naruszono regulamin