RasPi Magazine 09, Raspberry PI, RasPI - Magazyn 2015
[ Pobierz całość w formacie PDF ]
//-->ESIGNDUILDBCODE9WelcomeUnless you’ve got a Jam to goto, mornings can be tough.Get your Raspberry Pi involved,though, and all of a suddenyou can freshen up your wake-up and startyour day properly with an alarm clock that’spersonalised to suit your routine. Need a17-minute snooze? No problem. Only wake upto the sound of singing narwhals? That’s finetoo. Swipe forward a few pages to crack on.This issue we’re also getting you started withservos, now that you’ve mastered the GPIOports, as well as casting a critical eye over thebiggest distros for your Raspberry Pi to findout which OS is best. And if you’re using anolder Pi with just a couple of USB ports, you’lllove our keyboard and mouse guide.Get inspiredDiscover the RasPicommunity’s best projectsExpert adviceGot a question? Get in touchand we’ll give you a handEasy-to-followguidesLearn to make and codegadgets with Raspberry PiDeputy EditorFrom the makers ofJoin the conversation at…@linuxusermagLinux User & DeveloperDRasPi@imagine-publishing.co.ukas imagine pContentsSmart alarm clockWaking up is easy when you have PiShare your keyboard & mouseUse your peripherals on multiple machinesDiceBotMeet the tweeting dice rollerRaspberry Pi OS super testIs Raspbian really the best distro for your Pi?Control servosGet your projects movingScience on Raspberry PiStart using numpy and scipy todayTalking PiYour questions answered, your opinions sharedSmart alarm clockTurn your Raspberry Pi into a better alarm clock usingPython and a single buttonAdvancements in alarm clock technology arehardly exciting news reports you’d see on theten o’clock news but it’s something very realin this day and age. Anyone with a smartphone hasaccess to a world of apps tailored to helping users get abetter night’s sleep, through sleep-cycle sensing and agradually increasing alarm volume to softly wake themup. If you don’t have a smartphone or find the currentselection too limited, you can always make your ownsmart alarm clock using a Raspberry Pi. In this tutorialwe’ll show you how to program the Pi to play a bit ofwhite noise, use a custom alarm sound and have itwake you gently.THE PROJECTESSENTIALSSpeakers or some formof audio outputPush-button switchClock case01Update your PiTo make sure the Raspberry Pi will work as expected,it’s best to get it updated first of all. Do this with:Breadboardsare excellent forprototyping circuitsbut if you want tostart keeping your Piby your bed, it mightbe better to get acase and lose thebreadboard. As thewiring is very simple,you could easilysolder it up andconnect it to the GPIOports directly. Drillinga hole in a case willkeep everything tidy.sudo apt-get update && sudo apt-get upgradeThis will also mean that when installing new softwarethe latest version is installed as well.02Install audio playbackFor this tutorial, we’ll be using VLC to playback the whitenoise and the alarm sound. It can be used quite easilyby Python for the tasks we want it to perform. Install it inthe terminal using:$ sudo apt-get install vlc“Thealarm clock will also support playlists ifyou prefer listening to music”
[ Pobierz całość w formacie PDF ]