RasPi Magazine 12.pdf

(10178 KB) Pobierz
ESIGN
D
UILD
B
CODE
12
Create a
TEST
CIRCUITS
SCOPE
Plus
Program Arduino on your Pi
WITH A
Welcome
If you’re anything like us,
chances are that you’ve got
a few spare Raspberry Pis
knocking about that have
effectively been replaced by your shiny new
Model 2B. That doesn’t mean they have to
stay in your drawer, though – it is a
lot
simpler
than you think to simply chain them together
and have them share their processing power
in one big Raspberry Pi cluster. Get enough
of them and you will basically have your own
supercomputer. It’s great fun to set up and
opens up some incredible programming
possibilities – just swipe forward a couple of
pages to get cracking. And once you’ve got a
cluster up and running, be sure to let us know
what you’re going to do with it – have fun!
Get inspired
Discover the RasPi
community’s best projects
Expert advice
Got a question? Get in touch
and we’ll give you a hand
Easy-to-follow
guides
Learn to make and code
gadgets with Raspberry Pi
Editor
From the makers of
Join the conversation at…
@linuxusermag
Li
Linux User & Developer
U
D l
Develope
RasPi@imagine-publishing.co.uk
RasPi@imagine p
Contents
Build a Raspberry Pi cluster
… and then crunch code like a CERN scientist
Manage your cluster with IPython
Configure your Pis to handle parallel programming
What is Python?
We use it all the time but why is it so special?
Program Arduino on your Pi
Take advantage of the awesome Arduino IDE
Joytone
Check out the keyboard made of Xbox joysticks
Transform your Pi into a micro oscilloscope
Get to grips with the ultimate tool for electronics
Talking Pi
Your questions answered and your opinions shared
Build a Raspberry Pi cluster
Pool the resources of multiple Pis to create
your own scalable Pi supercomputer
“All
you need is a lot
of Raspberry Pis, a bit
of Python know-how
and a reason to use
it. It’s a great project
for classrooms”
The Raspberry Pi is actually quite powerful for
its price. On its own, though, you won’t be doing
any extraordinary calculations – or compiling,
or anything strenuous at all, for that matter. However, as
it’s readily available and fairly cheap, you can get twenty
of them for the price of a new computer. Each of them on
their own will be no different, but link them together over
a network and you can have them share their power and
vastly increase the amount they can process.
This kind of setup is generally known as a Beowulf
cluster, so named for the eponymous hero of the epic poem
in which Beowulf is described as having “thirty men’s heft
of grasp in the gripe of his hand”. It’s not ridiculously hard
to achieve, either – all you need is a lot of Raspberry Pis, a
bit of Python know-how and a reason to use it. This makes
it a great project for things like classrooms, after-school Pi
clubs and the like – really, anywhere there’s a collection of
Pis available for general use. The more Raspberry Pi nodes
you add into the setup, the more powerful it will become,
which means you can start with just two or three at home
and then gradually add more and more to your cluster, if
you want to. And because of the way it all works, you can
hook in and control your Pi cluster from your main computer
as well, making this as accessible
at it is scalable.
Over the next few pages we’re
going to show you how to get your
Raspberry Pis set up ready for use,
including all the tools you’ll need,
how to get them all connected and
then finally what you can do with
all that processing power. We’d
love to see your cluster once it’s
finished – drop us a tweet!
“You
can hook
in and control
your Pi cluster
from your
main computer
as well,
making this as
accessible at it
is scalable”
Below
GCHQ, the UK’s
NSA, have a cluster
of 66 Raspberry Pis
named the Bramble:
http://bit.ly/1wuTepj
Zgłoś jeśli naruszono regulamin