The MagPi Issue 3 Final.pdf
(
15293 KB
)
Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
I
I
S
S
S
S
U
U
E
E
0
0
3
3
J
J
U
U
L
L
2
2
0
0
1
1
2
2
A
A
M
M
a
a
g
g
a
a
z
z
i
i
n
n
e
e
f
f
o
o
r
r
R
R
a
a
s
s
p
p
b
b
e
e
r
r
r
r
y
y
P
P
i
i
U
U
s
s
e
e
r
r
s
s
F
F
i
i
r
r
e
e
d
d
u
u
p
p
a
a
n
n
d
d
r
r
e
e
a
a
d
d
y
y
t
t
o
o
g
g
o
o
1
1
5
5
0
0
+
+
G
G
A
A
M
M
E
E
S
S
•
•
D
D
e
e
b
b
i
i
a
a
n
n
E
E
s
s
s
s
e
e
n
n
t
t
i
i
a
a
l
l
s
s
T
T
O
O
T
T
R
R
Y
Y
O
O
N
N
Y
Y
O
O
U
U
R
R
P
P
I
I
•
•
T
T
h
h
e
e
C
C
C
C
a
a
v
v
e
e
•
•
S
S
c
c
r
r
a
a
t
t
c
c
h
h
P
P
a
a
t
t
c
c
h
h
QRCode:
•
•
P
P
r
r
o
o
g
g
r
r
a
a
m
m
m
m
i
i
n
n
g
g
F
F
u
u
n
n
d
d
a
a
m
m
e
e
n
n
t
t
a
a
l
l
s
s
http://www.themagpi.com
RaspberryPiisatrademarkofTheRaspberryPiFoundation.
FrontCoverandFeedbackimageswerecreatedusingPhotofunia
WelcometoIssue3ofTheMagPi,acommunityleadmagazinekeepingyouuptodate
withallthingsRaspberryPi.
Thismonthhasseentheteamworkinghardsearchingandtesting9000stableDebian
packages,andidentifyingover150gamesand43appstotryoutonyourPi.
Meltwaterintroduceshisarticle‘MeetingPi’,offeringideasandtipsonintroducingthe
RaspberryPitousersofveryyoungages.Wefeatureanarticleonlowlevelprogramming
usingCandAlexKerrhasproducedhisarticle‘Programmingfundamentals’describing
howtousevariables,‘If’statementsandloops.
BodgeNHackittcontinueshisseries,explaininghowtoprogramtheUSBroboticarm
usingpython.DarrenteachesusmoreoninterfacingwiththePi,plusmorefromthe
reader’sfavouritesCommandline,ScratchPatchandthePythonPit.
Anemailthatcaughtmyeyethismonth
wasfromCaytonJohn,aged7,readingup
onthefirsteditionoftheMagPi.
Couldthisbeouryoungestreader?
Ifyouhavephotosreadingourmagazine,
pleasesendthemtoeditor@themagpi.com.
OnbehalfofTheMagPiteamwewanttothankWillBengtsonandhisteamatQRtfor
givingusourbeautifulpersonalTheMagPiQRcode.Pleasecheckouttheirsiteat
http://QRt.coandseetheirclevergeneratorandotherattractivework.
Finally,keepyourquestionsforLizandEbencominginandlookforourofficialinterview
innextmonthsmagazine.
WehopeyoucontinuetoenjoyreadingtheMagPiandthatit
inspiresyoutogetprogramming.
AshStone
ChiefEditorofTheMagPi
2
G
G
E
E
T
T
T
T
I
I
N
N
G
G
Y
Y
O
O
U
U
R
R
R
R
A
A
S
S
P
P
B
B
E
E
R
R
R
R
Y
Y
P
P
I
I
T
T
O
O
A
A
U
U
T
T
O
O
B
B
O
O
O
O
T
T
T
T
O
O
L
L
X
X
D
D
E
E
IfyouaretiredofloggingintoyourDebianSDcardwithusername:pi,password:raspberryandthentyping
startx,youcangetyourRaspberrytobootstraighttothegraphicalinterfacewithouthavingtotype
anything...
After logging in type:
sudo nano /etc/inittab
Scroll down to the line:
1:2345:respawn:/sbin/getty 115200 tty1
Change it to:
#1:2345:respawn:/sbin/getty 115200 tty1
(Put a # at the beginning to comment it out)
Add a line under it:
1:2345:respawn:/bin/login -f pi tty1</dev/tty1>/dev/tty1 2>&1
Press CTRL+X and Y to save changes
Then type:
sudo nano ~/.bash_profile
Type in:
startx
Press CTRL+X and Y to save changes
Then
sudo reboot
Your Pi should now boot up to LXDE automatically. I'm sure that will make many of you happy!
Make sure to follow those instructions carefully, and be aware of the lack of security - The contents of your Pi are
now open to anyone that has access to it. More useful Debian tips overpage.
ArticlebyJaseman
Contents
DebianEssentials
P.04
TheCCave
P.22
Interfacing(InControl)Part2
P.07
TheScratchPatch
P.24
CommandLineClinic
P.10
ThePythonPit
P.26
SkutterPart2
P.14
ProgrammingFundamentals
P.29
ProtectYourGPIOConnector
P.16
Feedback
P.30
MeetingPi
P.20
Weblinks&Credits
P.32
YoushouldalsocheckthesettingsofyourTVormonitor
(4:3/16:9aspectratio,imageadjust,panandzoom
settings).
INSTALLINGTHESOUNDDRIVERMODULE
IfyouintendtohavesoundthroughtheTV,makesurethe
TVvolumeisup,otherwiseconnecta3.5mmheadphone
cablefromthepi'sanalogueoutputtoyourspeakers/stereo
equipmentandswitchthemon.
E
E
S
S
S
S
E
E
N
N
T
T
I
I
A
A
L
L
S
S
F
F
O
O
R
R
Y
Y
O
O
U
U
R
R
R
R
A
A
S
S
P
P
B
B
E
E
R
R
R
R
Y
Y
P
P
I
I
Theseproceduresweretestedwiththe
debian619042012.imgfrom:
http://raspberrypi.org/downloads
Afterloggingintypethefollowingatthecommandprompt:
sudoaptgetupdate
sudoaptgetinstallalsautils
(Answer'Y'ifaskedabout
diskspaceused)
sudomodprobesnd_bcm2835
(YouwillneedtohaveyourPiconnectedtotheinternet.)
REMOVINGTHEBLACKBORDERFROMAROUND
THESCREEN
IfyouwantsoundthroughtheHDMIcabletype:
sudoamixercsetnumid=32
Thisstepisonlyrequiredifyouarefindingablackborder
aroundtheedgeofyourscreenortheimageoverlapsthe
screen.
Orifyouwantsoundthroughtheanalogue(headphone)
sockettype:
sudoamixercsetnumid=31
Afterbootingupdebian,loginwith
username:
pi
password:
raspberry
Tomakesurethesounddrivermodulegetsloadedeach
timeyoubootuptype:
sudonano/etc/modules
Atthepi@raspberrypi:~$prompt,typein:
sudonano/boot/config.txt
Atthebottomofthefile(Undervchiq),addthefollowing:
snd_bcm2835
Typethefollowingintothenanotexteditor:
overscan_left=10
overscan_right=10
overscan_top=10
overscan_bottom=10
PressCtrl+XandthenYtosavethechanges.
Rebootthepi:
sudoreboot
PressCtrl+XtoExitandYtosayYestosavingthe
changes.
LoginandstarttheLXDEGraphicalInterfacebytyping:
startx
Whenyouarebackatthecommandprompttype:
sudoreboot
WhenLXDEhasloaded,Select'MusicPlayer'fromthe
Sound&Videomenu
Presstheplaybutton.Ifalliswellyoushouldheara40
secondpieceofmusiccalled'Cellule'bySilence.
Waitforthepitorebootandseeifthebordershavegone.
Repeattheprocessabovechangingthenumbersbyminus
10eachtime,untiltheborderisgone.Ifoundthatmy
HDMImonitorrequired40forallsettings,butmyTV
workedbestwithzeroforleftandright,and20forbothtop
andbottom.Youwillneedtofindthebestsettingstosuit
yourparticularscreen.
Ifthepicturegoesofftheedgeofthescreen.Justuse
positivenumbersfortheoverscanvalues.
Youcanusefilemanagertocopymp3musicfromaUSB
memorystickontoyourhomefolderorplaythemdirectly
throughMusicPlayer.Notehoweverthatitwon'tplaywma
files.
FIXINGGEANY(PythonEditor)
WhentryingtoexecutepythonscriptsfromGeanyyouwill
getanerror.
IFAFTERREBOOTINGYOUAREGETTINGNO
PICTURE:
Toresolvethis,gotoEdit>Preferences>Tools.
Youcanresetthesettingsbacktodefaultbytypingblindly:
pi
raspberry
sudorm/boot/config.txtR
sudoreboot
Changethe'Terminal:'settingfrom'xterm'to
'/usr/bin/lxterminal'.
ClickApplyandOK.
INSTALLINGOMXPLAYER(CommandLineMovie
Player)
Thiswillremovetheconfig.txtfilecompletely.Afterthe
rebootyourpictureshouldreturn.Trysettingyour
overscanagainwithslightlylowernumbersuntilyoufind
thebestvalues.
TheOMXPlayerwillallowyoutoplayaviandmp4movies
onyourRaspberryPi.
Oralternatively,ifyouhaveaWindowsPCandacard
readeryoucanaccesstheconfig.txtfileandedititwith
Windowsnotepad.
Atthecommandprompttype:
wgethttp://seyrsnys.myzen.co.uk/rpi/omxplayer_0.0.1
4
arm.deb
sudodpkgiomxplayer_0.0.1arm.deb
sudoaptgetfinstall
mc
MidnightCommanderterminalfilemanager(Type
'mc')
milkytracker
MusiccreationtoolinspiredbyFastTracker2
mtpaint
PowerfulGraphicEditor
openoffice.org
OfficeProductivitySuite
oxine
MediaCenterforMPEG,MP3andWMA
qrencode
QRCodeencoder>PNGimage(Typeqrencode
<string>ofilename)
schism
ImpulseTrackerClone
scribus
DesktopPublishing(UsedtoproduceTheMagPi)
ghostscript
PostScript/PDFinterpreter(UsewithScribus)
tuxpaint
APaintProgramForYoungChildren
xball
Simulatebouncingballsinawindow(Clickanddrag
inthewindow)
xchat
IRCChatClient
xcircuit
ElectricalDiagramPackage
xineui
MediaPlayerforMPEG,MP3andWMA
xpad
StickyNoteApplication
xpaint
SimplePaintProgram
xtrkcad
ModelTrainTrackCADProgram
yakuake
Aterminalwindowdropsdownfromthetopofthe
screenwhenyoupressF12.
UsefilemanagertocopysomemoviefilesfromaUSB
deviceintoyourhomefolderthenfromthecommand
prompttype:
omxplayerfilename
Whilstplayingpress'p'topause'q'toquit.Arrowstojump
forward/back.
INSTALLINGCHROMIUMWEBBROWSER
ChromiumisslowonthePi,butitworkswellwiththe
followingusefulwebsites:
http://qwebirc.swiftirc.netinstantmessengerchatrooms
http://www.dropbox.comupload/download/share/transfer
http://www.gmail.cominBasicHTMLmodesend/receive
googleemailwithattachments
sudoaptgetinstallchromiumbrowser
INSTALLINGXPDF
3dchess
Game(3x2dboards)
abe
Abe'sAmazingAdventureGame
aceofpenguins
Freecell,Solitaire+Minesweeper,Teipei...
airstrike
2DAirplaneDogfightingGame
atom4
ColorPuzzleGame
atris
Tetrisgame
balazar32d
Cool3DGame
beneathasteelsky
ScifiAdventureGame(NiceIntro!
XPDFisafreePDFdocumentviewer.
DownloadTheMagPipdf'sbyopeningMidoriwebbrowser,
andvisitinghttp://www.themagpi.com.Clickononeofthe
PDFdownloadmirrors.Choose'Save'andwatchthe
progressofthedownloadatthebottomrightofthe
browser.
)
blobwars
MetalBlobSolidAmazing2DPlatformGame
blockade
PuzzleGamecommandline'sudoblockade'
bumprace
2DSpaceMazeGame
bygfoot
FootballManagerGame
ceferino
DonCeferinoHazaaPlatformGame
childsplay
InteractiveChildrensGamesCollection
crimson
CrimsonFieldsTacticalGame
dangen
StrangeShoot'EmUpGame
dodgindiamond2
ArcadeShoot'EmUp(PressMforFire)
dossizola
IsolaBoardGame
empire
TextOnlyEmpireBuildingGame
enigma
PuzzleGame
etw
EatTheWhistleFootballArcadeGame
filletsng
FishFilletsPuzzleGame
flobopuyo
Connect4meetsTetris
freealchemist
BlockGame
freedink
RPG(UseGNUFreeDinkfromOther)
freedroid
ParanoidGameClone
frozenbubble
FrozenBubble2Game
geki2
Xenonlikeverticalshoot'emup(Fantastic!)
geki3
RTypelikehorizontalshoot'emup(Amazing)
ghextris
ATetrissudolikeGameOnAHexagonalGrid
glotski
SlideBlocksToReachAGoal
glpeces
TangramPuzzleGameClone
gmchess
ChineseChessGame(Xiangqi)
gnugo
TheGameOf'Go'
gnujump
PlaftormGame
gnuminishogi
MiniShogi5x5Board(Type'help')
golly
GameofLifeSimulator
gravitywars
GravityForceClone
grhino
Othello/ReversiBoardGame
groundhog
SimpleLogicGame
gtans
TangramPuzzleGame
gtkatlantic
GameLikeMonopoly
gtkballs
LogicGame
gtkboard
ManyBoardGamesInOneProgram
Atthecommandline,type:
ls
(checkthatTheMagPiIssueXFinal.pdfislisted)
sudoaptgetinstallxpdf
(TypeYifaskedaboutdiskspace)
xpdf"TheMagpiIssue1Final.pdf"
(Waitamomentandthe
pdfdocumentshouldbedisplayed)
OTHERAPPSANDGAMES
NOTE:Someofthesegetlistedunder'other'onthe
LXDEmenu.
Toinstalluse:
sudoaptgetinstall
<name>
Touninstall:
sudoaptgetremove
<name>
Tocleanup:
sudoaptgetautoremove
abiword
WordProcessor
amsn
MSNMessenger(Slowtoopen/closebutworks)
audacity
AudioEditor/Player
avifileplayer
UselessforvideobutplaysWMA+MP3music
brandy
BBCBASICVProgramming(Type'brandy')
bwbasic
BywaterBASICProgramming(Type'bwbasic')
espeak
CommandLineText2SpeechSynth
evolution
EmailCalendarContactsMemosTasks
extcalc
PowerfulScientificCalculator
feh
CommandLineImageViewer(Withmanyoptions)
filezilla
FTPfilesharingclient
fotoxx
PhotoEditor
fraqtive
MandelbrotDesigner
galculator
Calculator
gimp
GNUImageManipulationProgram
gnumeric
Spreadsheets
gpaint
MSPaintlikedrawing
grafx2
256ColorPaintProgram
grisbi
PersonalFinanceManagementProgram
homebank
ManagePersonalAccountsAtHome
lifeograph
Privatedigitaldiary
matchbox
OnscreenKeyboard
Continuedoverpage...
5
Plik z chomika:
Raspberry_Pi
Inne pliki z tego folderu:
The MagPi Issue 3 Final.pdf
(15293 KB)
The MagPi Issue 1 Final.pdf
(10979 KB)
The MagPi Issue 2 Final.pdf
(12946 KB)
Inne foldery tego chomika:
-=Raspberry Pi=-
▌Aplikacje raspberry pi
█ Raspberry Pi soft
Podręczniki
Raspberry PI & Linux Debian ubuntu i inne
Zgłoś jeśli
naruszono regulamin