Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
268 views
184 pages
Complete Raspberry Pi Coding & Projects Manual - 15th Edition 2022
Uploaded by
venkatesh reddi
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Complete Raspberry Pi Coding & Projects Manual – 1... For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
268 views
184 pages
Complete Raspberry Pi Coding & Projects Manual - 15th Edition 2022
Uploaded by
venkatesh reddi
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Complete Raspberry Pi Coding & Projects Manual – 1... For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 184
Search
Fullscreen
Raspberry Raspberry Raspberry Pi 4 § 400 § Pico 100% Independent SEP 2022 EDITIONWant to master your Code? Then don’t miss our NEW Programming & Coding magazine on Ei Readly now! fel fereel mirc Ure\ Leconte mae veThe eo Donal Series Raspberry Pi Coding & Projects Unlock and master the potential of your Raspberry Pi... Thanks to the Raspberry P's unique setup, operating system and amazing community of imagineers, this little computer has become one of the most important pieces of educational technology in the world, It's helped people learn how computers, coding and electronics work, as well as helping science and engineering, astronauts and technicians, young and old, teachers and students. With our Raspberry Pi guide in your corner, you will learn and discover how the Pi works, what you can do with it and where to take your Pi adventures. We've got everything from setting up the Pi to learning how to code on it using Python, and from learning Linux to projects that'll take you and your Pi to the next level. Read on, and let’s unleash your imagination with the power of the Raspberry Pi.Contents 6 Raspberry Pi is Good For You! ES dak aa 10 Get to Know the Raspberry Pi Pa Sele eed Reece} eae en te) Sees omega eure rahe Pe iaaecee Lees) Perna) iieeousicn Pr Miger erate Pers cu ee Wend 30 Pico Projects & Ideas 50 Explore Raspbian 7 Cae PMs ee hueke ue Ren) Caen focel exe 58__Connecting to the Pi Remotely 60 Using APT to Install and Cee es 32 cry ET 38 rT) rT) 48 7] 66 Casement eee Operating System Which Pi is Right for Me? Raspberry Pi in Numbers ae ens SetitUp Paonia) ears Ro coo eae Ey Dieta Sco aayas ARR IN) Peru a ree) Cea rs Cou STE) (ener ene ecg Edit Images with GIMP68 Python on the Pi 70_ Starting Python for the First Time Pm 74_ Saving and Executing Your Code amet nee een Command Line Pee ues ECM) Emer Rn cues raat 86 Creating Functions 88 Conditions and Loops CMe) Cau 94 Python Graphics Cees imc 98 Python Code & Ideas Sonim eu SAN emer en Kea 104 Text Adventure Script tome ered NCE como Meow Aeon onc Green eee ekSsrad 114 Mastering Linux Dwar DU scu) 120 Listing and Moving Files Peer ene eee) 124 Create and Remove Directories 126 Copying, Moving and Renaming Files SPT euae ee See mcaa) Peeet kare) 134 Ownership and Permissions Rees MS Semen eeu PEt ter eae) 140 Input, Output and Pipes 142 Fun Things to Do in the Terminal 144 More Fun Things to Do in the Terminal Pea Sues) 148 Command Line Quick Reference Dye come ese 152 Pi Projects pote eee) Eee Sarena Nai So eae Tooker) Se oa ac rae 166 Stream Digital TV with a elite 168 Stream Digital TV witha Nae Contents De ahias caer da lala ead ea cca Contre \ 7 \ D/sakeo coca eas alge cea Station 180 Common Raspberry Pi ProblemsAlla ‘aspberry Pi is Good For You! jN Raspberry Good For You! INDEX 5 Raspberry Pi is Good For You! Your journey with this amazing little computer begins here. Say hello to the Raspberry Pi; learn how it works, what kind of operating system it has, what you need to get it up and running and much more. This is your first step into the world of the Raspberry Pi. PUR es rol one Cele Re eR LCR tll ip RCL lt Celt little computer and project board. There are in-depth guides to the hardware, CYT TesT Cae RSS CHUA ol Maco OM Lt MOTEL RU ed Le Sea ECM UC} Pi has to offer from your computer's desktop. Now let's see what this amazing ee mR ORL 8 Say Hello to Raspberry Pi ene nar nasser dal PP Sere enue dae) ieee) Reg ek keer Pl ar eee aac ecg ease ns 20 The Pi Pico - Up Close Paar RD A eae Rae boca aoriec eeu kd EM a eae a Ere see cry Fa feted Let's take a look at Berek ay Ceca Ey aT ‘System 36 Which Pi is Right for Me? ERs cada need PO ose cee ea kd Pea re eae) Pres 44 Set Up Raspberry Pi Using a Windows a Uke rT) CCRC sae kU Will Need center) fees aeaa eed Set Up Pensa ets aoe eg at) Creer Ts Sn iBB Raspberry Piis Good For You! poe eee nT eee Perea rte eee eer Ferien eo Complicating matters slightly isthe existence of a Raspberry Pi Model See agen ee Tbe) oe Tran ereee pte reeecR cd Pear ee es ener eT aces peas Se een oe a a erence tise cenet, improved mass storage, rea noe aL arate eter eee he new Raspberry Plare the same asthe pr Bee Pee eeu eosin ae see ena irr etree nase nS 8 voiwtemeubliations.com‘The Raspberry Pisa British builtlow cost computer that enables everybody to learn computing, start programming and explore basicelectronics. I's the size oF credit card but capable of running afull operating system and doing everything a desktop does. More importantly, with the Raspberry Piyou install your own operating system, connect all ‘your devices and create your own programs Using languages like Scratch and Python, “There's no case so you can hook up electronic Circuits to the pins and control them to get input and output, so you can hack together electronic projects at home. Setting up a Raspberry Pis pretty simple, ‘and throughout this book welltake youstep- bysstep from unboxing your Raspberry Pito setting it up and getting started. “There are many different models oF Raspberry Pi available and each has sightly different Features (see opposite. ‘The Fundamentals of each Raspbery Piare similar though. Each modelis lightweight UCT) ol aie ay elec) eat Porritt) ® recent ree CAC rere) Rear et Say Hello to Raspberry Pi ai ‘computer on asingle board that’s roughly the size ofa credit card, Each Raspberry Pi board features a processor made by ARM, whichis similar to the models you Findina ‘mobile phone. The ARM processors fast {and lightweight butt runs a different set of software than you might be used to. There ‘are many different operating systems (05) 2vallable, but for most ofthis book well Focus on one called Raspberry F105, which isthe OS recommended by the Raspberry Pi Foundation There'sno hard drive on the Raspberry Fi, instead the operating systems installed ‘onan SD Card (the cards typically usedin cameras). The operating system is installed ‘onto the SD Card by copying the Files to the SSD Card using a computer. We'llshow you hhow to set up the Raspberry Pi OS using a ‘Mac or Windows computer. ‘Once youhave an OS installed on the SD Card you can set up your Raspberry Pi The Raspberry Piis connected to 8 monitor via a HDMI socket whilst a keyboard and mouse is Ceoeatd is Paced attached to the USB socket. A smaller Micro USB connection is used to provide powerto the device, Most Raspberry Pimodels Feature ‘an Ethemet connection, and an Ethernet. cable is connected from your Raspberry Pito asocket on your modem router. Both the Raspberry Pi 3 and 4 models have builtin wireless networking and Bluetooth, making it easy to get online. You can attach USB Wii dongle or Ethernet adaptor to older models. First it wil help to know which Raspberry Pi youare using. This can be tricky as there have been several distinct madels so far. The layouts opposite will help you determine which Raspberry Pi you have. This book covers athe different models, and they offer largely similar Features, although newer models offer adaltional extras. Once yyou know which Raspberry Pi you own, you can gett up and running. Rmeenacneca mtr eae eee ance ee ear rete G i Beet eter tte eat at Eimear Pierre vwuhémpublistionscam 9BB Raspberry Piis Good For You! Get to Know the Raspberry Pi While the Raspberry Pi 4 is the newest model, the Pi 3 models are the most popular among the community. They're cheaper, more compatible with current hardware and software, and still pack a significant performance punch. Here's what powers the fantastic Pi 3. 10 vnwemeubiatins.comGet to Know the Raspberry Pi i vwuhémpublistionseom 11a: Raspberry Pi is Good For You Up Close with the Raspberry Pi 4 Model B Ree eum eu nur ee enma ea eee Recaro nae PR cone ceielCoM eelel sre RUM OUT CMS Us UM Be once eR td Creo Secu nied FASTER AND CONNECTED ‘There’sa lotto lke about the Raspberry Pi 4: Up to 8GB of on-board memory aster quad-core CPU, support For dual 4K displays via a pair of micro-HOMI ports, and more, Let's take alook at the Pi 4, and see what t's got underthe hood. PRICING Since the Raspberry Pi4 now offers three different versions within the new model, it stands toreason thatthe Ee re a ‘of the Ps priced at around £34, depending on where Te oer ae) ‘£44, while the top-end, 4GB memory version will set you ‘back n the region oF £54, Together with the cost ofthe Pi itself, you wil also need to Factor in one or two micro-HOMI ‘ables (depending on whether you want to connect one oF ‘two monitors), each costing roughly S-plus. With a VideoCore 6 GPU, the Pi 4is capable of te acu Pra cer any Pe ree eae ce) with Raspbian, the Pi 4 is now a pretty d Sey Improved Processing Poet eee eee) performance, Thanks to this CPU, you're able to enjoy faster apps and content. Dual Display PE eae oe) Poet ee auc cea NE kon Peer es 12 wwtémpubistionscomUp Close with the Raspberry Pi 4 Model B QI aeons Cie ee as ee rene cig eR econ ere ate ci ‘write that data, both to eas Cae peas Connectivity PR Mee} eer is Carns Perea cect) ener Re Deere Wie} Cems ST ere Cn aceic ts i 3 veoha: Raspberry Pi is Good For You! The Pi 400 — Up Close The Raspberry Pi 400 is an aon all-in-one keyboard Pi that was ee released in November 2020, - offering the user a different approach to their Pi lifestyle. This compact and powerful Pi is ‘the flagship of a new kind of Pi, and one well hope to see more of in the future. Inside the Pi 400s a modified Raspberry Pi4. I's longer, spanning the width ofthe keyboard, with alarge hheatsinkto dissipate enough heat for the overclocked ‘pracessor. The P's communication ports are spaced ‘along the back ofthe P1400 keyboard, minusa second {USB 20 port anda 3.5mm audio jack. GPIO 40. The slightly recessed GPIO port Bere ett 400 board inside the keyboard. Sete rec) Cie ea ce) Be eet h) Pee ee etl microSD Card Slot See ea Bee ees etter eerie Drees ee ced micro-HDMI Ports Beira Re eee eae tens of up to 4K at 60 frames-p 14 wwcémpubistions.comThe 400 - Up Close TECH SPECS The Pi400has aslight advantage over the ee eee eee ead Dee eet es Se ee ee eee Pere een reas eee reer ay Pere rete meee ay pee een rae eca) Cenc eter Re al See ae eee eee) ‘microSD card pre-programmed withthe atest Pei USB-C Power The Pi 400 is powered by the 2x USB 3.0 Ports Sees ERT ear of the Pi 400, eer Da Ee eee one) fa ional variations: UK, US, ce USB2.0 Sere USB 2.0 port available. rere) Ree moc Se cet Pen e a) Gigabit Ethernet eee Rey Brant her USB 2.0 port is re Crees CRMs connection For the Pi 400 to your home CT Cun DeSean Eien) vwonehémpublistionscam 15;as Raspberry Pi is Good For You! Pi 400: Return of the 80s Home Computer The 805 onsidered the golden era of the home computer, a time when computing components were small enough to fit inside the living room of a house, and versatile Erte ES ae enc cick eee Uae RRR Lee) Releasedin November 2020, and while the UK and most ofthe world was stil in Lockdown, the Raspberry Pi 400 came ata time when we ‘were beginning to feel ike there was no end to the pandemic and the restrctionsit brought Initial thoughts were that the Pi 400 was a new smalt-board computer, ina similar vein tothe Pi 4and its predecessors. However, we were quite wrong, “The Pi400isa very different beast to that ofits siblings. Rather than the naked board we've seen inthe pas, the Pi 400 came as a complete keyboard package, with the P's Familiar ports lined up along the backplate ofthe keyboard. This \F was remarkably reminiscent ofthe home icrocomputers of the 80s, the prime examples being the ZX Spectrum and the Commodore 64, Indeed, the nostalgia was strong with this one, andi brought a smile to more than oneretro Fan's Face THE REINVENTION OF THE MICROCOMPUTER les more than sheer aesthetics that makes the P 400 hark back to a simplerage of computing. Inside the keyboards Raspberry Pi4, albeit one that's had a Facelift and some hardware alterations The id's ports, which re the twin micro HDMI and USB 3.0 ports, USB. 20, Gigabit Ethemet and microSD card sot, take up the rear ofthe keyboard together witha port that connects directly tothe 40 GPIO pins ~and resembling an older style communications port fromthe tear of an XT or earlier machine. Interms of hardware, the P4 inside the 400 has been expanded to Fit most of the width ofthe keyboard. The processor isthe same ARM, ‘V8 Cortex-A72.as Found in the bare Raspberry Piboard, but inthis instancei’s been overclocked to 1.8GHz; 300Mbuz Faster than the bare board. There's also 4G8 of LPDDR& RAM installed, but sadly no sign oF an 8GB version vihich the Pi abare model has on offer. “The keyboarditselFis available in different language layouts: UK, US, Germany, France, Raly and Spain. Essentially it's the same keyboard thatthe PiFoundation has been selling for some tie, except ths time there's an actual Raspberry Plinside oft as opposed tot simply being amultéport USB hub. 16 wmwbémpubistionscom ‘The overclockis thanks tothe inclusion ofa large, internal aluminium heatsink, that spreads across the entire internal space ofthe keyboard. Ths, and thanks toa couple of ar vents con the bottom of the keyboard, are what allows the Pi 400 to be overclocked to the default 1.8GHz n fact, we even took the Pi 400 toanimpressive 2.2GHz, and it remained stable and cool enough For continual operation “The heat dissipation From the large heatsinks a great ideaand one that was previously seen in the Commodore 64 There'salso. thermal sticky pad on the top ofthe heatsink, thats attached to the Pi 400's processor and helps toi as much heat.as possible from the CPU. IF ‘you getinside, youl also see why the Pi 400 s missing aUSB 20 port; since t only Features asingle 2.0 port over the Pi 4's dual USB 2.0 ports. (One of the Pi 400's USB 2.0 ports has been used as ahard-wired ribbon connector to the keyboard section ofthe unit. Again, those of you Familiar withthe internal ofan 80s home computer will recall ribbons being attached to keyboard membranes.P1400 DESKTOP COMPUTING ‘One oF the prime benefits of having the Pi 400 keyboard setup is the Fact that it can be quickly plugged intoa monitor and working from the moment you hit the power key. The Pi ‘4bare board, for example, requires a separate keyboard and mouse, and, let's be honest here, nt many folk want to see bare dcult board on their desk. True, there are some great ‘design Pi 4 cases around these days, but the Pi 400 already comes ina neat package, ‘The extra overclock brings a decent amount of oomph to the 1 400, and as such t's perfectly reasonable to use the Pi 400, asa standard desktop computer. However, there comes with itsome negatives inthis respect. hile a great device, the Pi 400i alittle too small for comfort, spedfcaly atypical working day's use. e's roughly the same size as a laptop keyboard, but the keys dont feel a5 good abit too squishy for ourtastes. But, as with most things, we'll probably get used to it over time. ‘Another caveat that's worth mentioning, is that the Pi 400 lacks 3.5mm audio port. Where the Pi4 model had one, this doesrit, instead opting to output sound via the HDMI port). While thisisrita deal-breaker For most, it does mean that For personal listening you'll need to hook upa set of headphones toyour monitor, or Find another solution. The builtin Bluetooth will connect to headphones with that technology, Pi 400: Return of the 80s aa but you're mited to wired models, then you could be looking to buy upgrades However, with that in mind, the Pi 400is anather step closerto becoming the only computer you'lever need. THE ZX PI 64 ‘There'sa good Feeling of nostalgia when pluggingin Pi 400to amonitor or TV. t's like you're back to being 10 years old again and plugging in the Spectrum or the C64 Fora spot of gaming or homework before having to unplug tall when your Mum calls, through that dinners ready. ‘Thankfully, these days I's easy to save where you were and the entire thing doesn't crash when the kettle is switched on! ‘Overall the Pi 400 sa great addition tothe Foundations stable, and one that we're sure you'l come toloveand use daily wrbdmpubliationscom 17as Raspberry Pi is Good For You! Ten Pi 400 Projects and Ideas You may think that a Raspberry Pi 4 inside a keyboard would create some limitations, Nees eee nT nee caer Or cauecury way as a standard Pi 4, but there's a lot you can get to grips with EVERYONE LOVES PI We've puttogether ten possible projects that you could use yourP400 wth tht wil entertain and kep youbusy while helping you eam more about coding, the Piand comping STD Wee Rebcroveniirio PATRI see eve retnsthe XSpacton ori ar peekeeit ING that of the great home computers of ee) that we include the other great &-bit home computer the Ds we thought we'dstarethese ideas vith simple revothamed fomthe 0s, the Commodore The Pluses program caled project. Fuse isa Zx Spectrum emulator that'savalable for the c6é-rasp for C64 emulation, and cn be installed via https// Raspberry Pi. Instalit, and you can enjoy some of the greatest games _c&4emulator.111mb.de/index phpste=pp_ ever created. raspilang-enBaroup=
>>. Now, enter the Following: print "Hello, world!”) Users of Python wil undoubtedly recognise the syntax, butf you've never coded with Python before, then let's explain what's going on in this simple tine. ‘The print command, as you probably assume, Is used to print, or display, something tothe screen For the user to read. you want to'say something tothe user, then you'll need to enclose your text inside a par of brackets and quotation marks, nthis example, we're displaying the words He126,, word}. When the MicroPython interpreter reads the Print command it ill naturally assume that ‘somethings being displayed, and look or anumber of acceptable ‘outcomes. The first bracket and opening quotation mark means there's going tobe some tex, so the interpreter willlookFor a closing set of quotation marks and bracket. Press Enter and the words Heo, WoELA will appear inthe Shell section of Thonry. \What you've just done is communicate directy wth the Pico, and through MicroPython onthe Pico, it's recognised the command youve entered andactedonit, Just for fun enter the command again, but this time intentionally miss out the last bracket. You'l notice that the Shell doesn’t want to.continue without the bracket, so therefore it's an error. While Using MicroPython, or most other programming languages, you'll need to be careful what you type. The slightest mistake can have dire consequences to your code ~ or, more than likely, just stop IeFrom working, For the next example, dlickthe upper part of Thonry, where the number “tis. Now enter the Hello, world code again. When you hit Enter this time, youl notice that instead of running the code through the Pico, “Thonry has created a second line ands waiting fr more input. Wile using the Shells great, t's not o good For creating multHine code. Thisis where the upper section comesin.To execute the code in the upper section youl need todo the Following: Click the Run button; this opens anew window asking Fora save location (This computer or the Raspberry Pi Pico) This is because any code that's been entered in the upper section of Thonny needs tobe saved first, asa.py file, beforeit can be executed, 25 wmubémpubistions.comSelectthePicoas the save location, then when asked, create a name For the py file~in this case callit HeloWorldpy and dick the OK button. ‘As soon as you've saved the File, it will automatically un and you'lsee the output From the code displayedin the Shell bx. ‘Alternatively, you can open a browser and navigate to https//www. raspberrypi.ora/documentation/pico/getting-started/.Scroll down, ‘until you get tothe Getting started with MicroPython section, and follow the onscreen instructions. lick on the Download UFZ file button--at the bottom ofthe Getting Started info box. ‘Once the UF2 file has been downloaded, lcateit in the Downloads folder on your computer, and click and dragit into the Pico storage
File Explorer and choose the SD Card inthe sidebar. The drive should be empty, but we willeopy the files toitin the next steps. For now ust make sure that you can _access the empty root ofthe SD Card. COPY THE SOFTWARE eee oc Ea ert rer aay recent sen Ce ou dare Pet Oe eee oe contents. These are the files you need to copy tothe root (base) of etter EE Now it’s time to download the NOOBS software from the Raspberry Pi website. Open a web browser and enter hetpsy//www,raspberrypiorg/downloads/noobs/ into the URL Field ‘Scroll down to find the NOOBS section (not NOOBS LITE) and click Download Zip and Save. Azip file containing the NOOBS files s copied to ‘your Downloads Folder. Click Open Folder when itis done. a ree ers Deve et eek Mees copied wil install an operating system of your choice onthe Raspberry Rete ate rea ere oy the root (base of the SD Card and are not inside another Folder such eens [sre>4 ROSGReeaperneceeee See isp] the sidebar to display the contents. It should now eee pene teenies Cer arta Breiner an rere ee nt en a eet Sa et acute a eer 45SB Raspberry Pi is Good For You! The Raspberry Pi Desktop: What You Will Need 1In2016, the Raspberry Pi Foundation started work on an x86 ‘version o ts popular Raspbian operating system. By the end of the Following year, there was alink on the Downloads page and rnon-Pi owners could now instal and use Raspbianin almost the exact same way asif they were in front of a Raspberry Pi r “The Raspberry Pi Desktop (:86 version) allows youto view the same desktop and pre-installed software as the Full Desktop version available fr the Raspberry i. You can install it on any decent PC, or laptop, one that's atleast sixor seven years old would be perfectand as aPC that age usually struggles with the latest version of Windows 10, you can now install Raspbian Instead of boxing that old kt and resigning it toa life oF gathering dustin the loft. ‘The major differenceis that this version has been compiled to.run ‘0n x86 processors, that’s Intel and AMD PC processors. Whereas, the version of Raspbian that you will find on aRaspberry Pi hasbeen ‘compiled and created exclusively For ARM processors; the type of (CPU a Raspberry Piuses. These CPUs usea different architecture tothatofan intel or AMD CPU, so the software required to runon ‘one wor'trun on the other unless the developer has specifically made either an x86 or ARM version. In short, iFyou've Found a piece ‘of software that you enjoy using on your Raspberry Pi,you wor't be able to useiton the Raspberry Pi Desktop x86 version - UNLESS, there's dedicated xa6 version ofthe software. 46 wwwbémpubleationscom Since then, the Raspberry Pi Desktop, orasit's correctly called Debian Stretch with Raspberry Pi Desktop, has followed the same release path asits P-based sibling. However, there are some differences you need to be aware of prior to throwing your Pi ‘away and opting for this version instead. — » Another caveat worth mentioning isthat you wor'thave access to the 40-pin GPIO that the Raspberry Pi Features as this sn'ta standard piece of hardware on anormal PC. There s,however, away around this. IFyou owna Raspberry Pi Zero (ether with or without the W), then you're able to connect the Zero to a spare USB port on the PC, via the Zeros micro USB port and the Raspberry Pi Desktop OS will recognise the Zero as extended hardware andallow you access tothe Zere's 40-pin GPIO, which you haveto admis pretty clever stuffThe Raspberry Pi Desktop: What You Will Need 8 WHAT YOU WILL NEED Here's alist of tems needed if you want to test out the latest version of the Debian Stretch with Raspberry Pi Desktop OS on your PC. i "Naturally youl need the Raspberry Pi Desktop OS, just ‘3s you would with Raspbian or the Pi. Open a browser ‘and download the ISO file that contains the OS from: hetps//www raspberrypiorg/downloads/raspberry-pi-desktop/. a te gery PPTTINY An cider desktop PC orlptopis aniseal ee] Ss candidate for running the Raspberry Pi Desktop | (05. while you can eaty use the atest PCaptop sat ver for thispaticlar operating item. Rufus (Found at: https://rufus.ie/en_IE.htm)), which isa piece of sofeware that can create a bootable USB drive from an SO File and, at least, an 8GBUSB stick FREREEY sic ciziyancstys ESE se tonctccdatean however, you don't have a spare Zero, isnot a problem as there's stil plenty you can do with Raspbian on aPC. vwuhépublistionscam 478 Raspberry Pi is Good For You Debian Buster with Raspberry Pi Desktop ole Role UO WC RUS Rea a ROR UL Le Pe CIC Rue OL nee Mara eee asus ter eeu seune CaM gnc udp es sk col 10 THINGS TO DO WITH X86 RASPBERRY PI OS. “There'sjust as much you can do with this version of Raspberry Pi OS as with the dedicated Pi version. Here's ten great projects, and things to ddowith Debian Buster with Raspberry Pi Desktop. Peete Ths version of Raspbian apes the Full Desktop version for tne Raspberry Piso that means itcomes with al the necessary programming languages out of the box. Learn Python, C++, usethe HAT emulator, and even learn JAVA. Irsallthere under the Programming menu option PUM atanetad As the x85 version of Raspbian follows the Full Desktop Pi version, there's an entire office suite preinstalled. That means you can use that ld laptop or PC asa fully functional desktop replacement For Windows or macOS. LUbreOffice is also Microsoft Office compatible. ITT stg) Hook up 2 Zero without an SD installed, and select GPIO Expansion Board From the options, and you willbe able t talkto the Zero's40-pin GIO via the likes oF Python or Scratch By doing so, you have althe benefits ofa Raspberry Pi, with the power of your laptop. 48 wwwbdmpubleationscom ‘ew mst modern operstng stn, VUES MENS you can also browse the Internet exactly the same you woud whe tes oF Windows 10 or teats mace. AthsisaUnocbased OS thee’salsoanaddedelementf sei, asin tarpted es waaDebian Buster with Raspberry Pi Desktop 8 eee een te) AsthisisaDebionbased VINES the Raspberry Pi, even the Pi3 Model Br, isnt version oF Linux, you can the most powerful computing device avaiable. naturally install any ofthe tens oF milions oF Linux x86-based software Your older laptop is probably significantly more powerful, and as. currently available, Remember though, only software that hasboth an such, you will be ableto play the lkes of Minecraft without too ‘ARM and an x86versin wil workon boththe iverson and this muchtrouble. version of Raspberty PiOS. co exit! ca — RECOMMENDED SOFTWARE IBigiccuueid Prete tte) retro gaming is more to your tastes, then Software options also Debian has a huge number of retro available with the version ofthe PIS. Ths too allows you topickand emulators available covering consoles and home computers. Youwill, choose which of the Pi-favoured software you can add or remove, _need legal ROMs, however, to play the games, but hese are widely ‘Simply tick the box next tothe name of the app. avaiable From reputable sites. pane aon ce Teas touesSH Fon ihntheRaabery ph ERNE oF ose te ato oneal np secon alent such PUTTY en satin the OS Mere weve nibledsoH_wlunpaactweundeie POs ansescnfenner oul tndhoveconeied ram anather dows PC using PuTTYas|_eedtoconle visa ondty oe fon ampli lt thes len Ser toongto mentionExplore Raspbian The Raspbian operating system is a Linux distribution that comes pre-packed with a fantastic collection of programs and apps to help you get the most SR RUC oe et mone ee RMU ae ConA | Ce (FS Coleen MTL AM am ost ers a Renee (MRM 1 eo eo C++ and more. There's even an entire office suite for free, called LibreOffice, Sure Mere eee ee Ce CRU Ls ol Ree of Raspbian. Raspbian allows you to connect to your existing home network, surf the TCT aol MTeoR ce ero ele Cele n RUC MU gF more. With a few simple tricks you can easily install more free software that, MTC eur) oe oR OMe Mile oe LeRU Cee eee ee ela Rel ie computers and control the desktop. This section of the book introduces many of the skills, tricks and hacks you need to take full command of the Raspberry Pi. Skills that you will use time AIRE CM Cu necUt hea nat ts cee Ce aah Crna Riek rau ny Pac ec Cee URE 64 Using the File Manager 66 Edit Images with GIMP 58 Connecting to the Pi Remotely COP ect euro’ ee Cy ica Deter Cp Poet (Telus Prue Use GIMP to create feoraue eee) Rtas your programs. eTTake a Tour of PIXEL PIXEL is the desktop environment for your Raspberry Pi. I's built on top of Raspbian, the core OS, which is itself designed around the Linux distribution - Debian, specifically, Debian Buster. PIXEL is fine-tuned to run on the Raspberry Pi, taking advantage of its unique hardware. PIXEL, PIXEL stands for "Pilmproved Xwindow Environment, Lightweight". I’ a lightning fast and energy saving desktop that looks good too. It contains almost everything youl ever need to work with the Pi. The PEL terface isa module ta netalled se ESATO? ‘on top of the core OS. Ithas seen some improvements over the years ane wit the lease othe and Raspbin Buster eno lok thet. mere PETES) Theproora that come preintale with ue = 5 Raspbian are easily located by clicking on theRsoberyFilogointhe upper et comer ofthe dest, Once there, you can select from the sub-menu categories, Followed by the program name. 52 wmwbémpubistionscom FET ny voulioticethaewthinthe wainmena Gisele there's a category named Office. Inhere, Youlfnd prernstated ste of posrms called LibreOFFc, that ere Mirosf OF compat; heres ord proceso, dab, craning, resentation and speatshet program, 7c 10 soka PITSUE tena) To view the files stored on your Raspbian 0S, click on the Fle Manager con in the ‘Application Launch Bar (the one thats shaped tke a pair of files). This ‘opens.a window displaying athe files in your home directory. The Directory Tee gives quick access to common Folders, such as Desktop and Documents.| Take a Tour of PIXEL 6 I Sree EI casera men Choose Menu > Preferences> Hala Mera Ede ten Jor remove Raspberry lseson ick Mana> shutdown Three options apes ticks next to programs and sections you want toinclude\exclude, Use Shutdown, Reboot, and Logout. Click Shutdown, always walt for the ‘Move Up and Move Down to rearrange items inthe Menu. screen to go blank before removing the USB power. 26m Simon CUSTOMISE THE DESKTOP ‘Aswith any other operating system desktop, you're able to customise the Raspberry P's PIXEL InterFace, making it more personal and more you. RPT a choose menu > Preferences > Appearance PUENTE The second tab nthe Appearance Settings window ‘Settings to open the Appearance Settings allows youto adjst the menu bar that runs along window. There are four sections: Desktop, Menu Bar,System,and __the top ofthe desktop. You can change its size, colour, and even its Defaults. You can usethese to adjust the various options for your __location from the top tothe bottom ofthe screen. system, such as colours, layout, and soon. Ces [tena | Sem | Otte estep |Menuar| System | Deft , —— 2yo0 Filezeenwthinage © peas onan és ce ltempeion 2 cow caret Ox = The mostconimen change isthat of The Stem tab inte Appearance Setngs window wl be (EES the desktop wallpaper, or desktop esXL) ‘enable you to change the core system Font, as well as the background. The default is called ‘Temple’, however, by clicking on ‘mouse cursor size. There are numerous fonts to choose from and, iF ttemplejpg in the Picture section ofthe Appearance Settings, you _youwant, you can even install your own. have other images avaliable, Naturally, you can opt for your own, etkop | Mensa | Sytem | Dette Deseep Mensa Ser | Due sive Large 62122) rot Pst op stom nia ca vwuhdmpublistionscam 536 Explore Raspbian Exploring the Command Line USING TERMINAL Despite its graphical PIXEL interface, Raspbianis a Linux operating system and this means you'll spend alot of time working with text ‘commands. Using the command line is an important part of leaning to use a Raspberry Pi computer. EE By default the Raspberry Pi boots directiy into the PIXEL interface. Here you use a visual metaphor, les, buttons and so on, to make changesto your computer. The command lines where you control computer by entering text commands, Click Terminal the Menu bar to view the console See ae Ezy You can enter commands into the Terminal to make changes to the computer. Tis works alongside the POXEL interface. Enter:mkdir Desktop/test folder and press return. Notice anew folder appears below the Trash onthe desktop. agit to trash to get rid oft: You can use the Terminal and PIXEL evironments alongside each other. ORM S 0 Eman 54 vwbemeubiations. com EE “Another way to switch toa command line ervironment. ‘sto press ControlvAlt and F2 This gets rid ofthe desktop completely and you see just a black screen with text. Thisis known asa virtwal environment and you're now int? (ty isa throwbackto teletext writers). Youlineed to enter your login name 39 default) and password "raspberry" by dea Ee There are six different virtual environments available, Press Control Alt-F3 to switeh to the third, ‘and Control lt-Fé to go to the Fourth, and so on. You'll need to log ‘onto each one inthe Fist instance but can then ump beck and Forth between them, Dee ae eee eet ed eee tea)Exploring the Command Line 8 Isreps Press Control Alt to return to the PIXEL interface. istep6 Some users prefer to use just the command line. ‘One thing to realises that PIXEL isjust a program Open Menu > Preferences > Raspberry Pi configuration and choose To CLI and click OK and Yes. The Raspberry Pi will now boot into the command line interface. Enter: ‘starts to get back to PIXEL, open Raspberry Pi Configuration and, choose To Desktop to go back to normal running on top ofthe ttyt session. Open Terminal and enter: pki Lxsession Out there goes your desktop. Don't worry enter: starts to get It back again. Most ofthe time you just enter commands into the Terminal window on top ofthe PIXEL environment. SOuE+Om w 6 OEE & @ Ba8 Explore Raspbian Setting Up a Static IP Address DHCP RESERVATION "Now that you've set up your Raspberry and connected it to the network, you should take time to Fixit IP address. Ths will makeitalot easier For you to connect to the Raspberry PI from a Mac or Windows computer and share Files. When you connect ‘your Raspberry Pitoa network the router (or modem/router) assionsita number, known asitsIP Anternet Protocol) address. ‘Thisisa block of four cits andthe fstthree are usually 192.1680. After thatisa digitfor each electronic device. “Tofind out what number your Raspberry Piis using clickonthe Terminal icon and enter: €eonfig and press Return. You should find tnextto “inet addr”. The challenge’, thatthe router assigns this number using DHCP (Dynamic Host Configuration Protocol. When the Raspberry Piis unplugged it reuses the number and your Raspberry Pimay get a different number ret time. 5 ODM s 0 meses Ezy ‘The router typically takes the first address, so itis usually found at 192,168.01. That numbers reserved For the router. Often youl find thisnumber on your router marked “web address’. The router then asigns similar IP address numbers to the other devices you own as they are added tothe network, so '192.168.0.2 might be your computer, 192-168.03 your smartphone and 55 wwwbémpubistions.com EE {es better all-round if you can get the Raspberry Pito se the same IP address everytime you connect ito the network, You do this using DHCP Reservation. Ths is where you tellyour router to remember the Raspberry Pi address, and ont use that address from now on. Start by opening the Chromium Browser and entering 192.168.01 to connect to your router's web interface.We're using a Virgin Broadband router but the process similar on most routers. Googe the name ‘oF your router and "DHCP Reservation” to find the router youre looking for. Enter your admin password (our default password was listed on the back f the router). Click Advanced Settings » DHCP Reservation. n the DHCP Settings section you wil find all ofthe devices connected to your network. Scroll down and ind the one with the same IP Address listed in Step 3 MANAGING YOUR DHCP DEVICES Setting Up a Static IP Address s EE ‘Select the device using the check box on the right and scroll down to the Add Reservation section It should have filed inthe Device Name, MAC Address and P Address Fields. IF the Device name's "unknown" change itto“raspberryp. lick Add Reservation to ensure always uses that IP Address. Click Apply to enforce the changes. Now that you have setup a DHCP Reservation, you need to understand how to manage the different devices that may need to useit and connectto the IP. Now that youhave set up your Raspberry Piwith a DHCP Reservation it wil always connect tothe router using that P Address, You can check this at ay time by entering: {Lgeonfig nto terminal. The router always knows that it's your Raspberry Pi by checking its MAC address. hiss the set of si hexadecimal numbers next to HWadd inifcontig, Ifyou decde to free up that IP Address so other devices can use it, you can remove it From the router. ‘Open the router web interface (192.178.0.1) and cick Advanced Settings> DHCP Reservation. Scroll down to the IP Lease Table to find the Raspberry Pl Select the checkbox next tit and click Apoly and Yes. EEE ‘Your Raspberry Pi wil still have the same IP Address but iisrt guaranteed to keep it. Restart your Raspberry iby entering: sudo shutdown -rnow intoa Terminal window. When thas restarted enter: €eoniig and youl Find youstil se the same IP Address. Over time the router will use other slots For ‘new devices untilit reaches ts maximum (25S by default). Then it il, recycle disconnected devices. ‘Setting up DHCP Reservation is good practice because it ensures you Raspberry Piis always going to use the same IP Address.’ also a good idea to write it down or use a abel printer to create a label forthe Raspberry Pi. You will need this ‘number to connectto the Raspberry iva SSH, VPN or FPT (techniques we wil use throughout ths book)
You might also like
RasPi 01
PDF
100% (1)
RasPi 01
52 pages
Raspberry Pi Computing Ultrasonic Distance Measurement
PDF
No ratings yet
Raspberry Pi Computing Ultrasonic Distance Measurement
133 pages
Raspberry Pi: Step by Step Guide
PDF
100% (1)
Raspberry Pi: Step by Step Guide
149 pages
Elektor 2006IND en
PDF
100% (2)
Elektor 2006IND en
68 pages
Raspberry Pi Pico C SDK
PDF
No ratings yet
Raspberry Pi Pico C SDK
280 pages
Electronics Projects 15
PDF
100% (1)
Electronics Projects 15
178 pages
2021-04-01 The Complete Raspberry Pi Manual
PDF
No ratings yet
2021-04-01 The Complete Raspberry Pi Manual
185 pages
Raspberry Pi An Easy Guide To Programming Developing and Setup of Raspberry Pi
PDF
100% (2)
Raspberry Pi An Easy Guide To Programming Developing and Setup of Raspberry Pi
145 pages
1982 Siliconix Analog Switch and IC Product Data Book PDF
PDF
No ratings yet
1982 Siliconix Analog Switch and IC Product Data Book PDF
436 pages
Raspberry Pi For Beginners 2020
PDF
No ratings yet
Raspberry Pi For Beginners 2020
78 pages
DIY ESP8266 Home Security With Lua and MQTT: Created by Philip Moyer
PDF
100% (1)
DIY ESP8266 Home Security With Lua and MQTT: Created by Philip Moyer
43 pages
ESP32 Webradio ESP32 Audiokit (EN)
PDF
100% (2)
ESP32 Webradio ESP32 Audiokit (EN)
15 pages
Arduino - Learning 1 200 PDF
PDF
100% (3)
Arduino - Learning 1 200 PDF
200 pages
Electronics For You June 2017
PDF
100% (3)
Electronics For You June 2017
157 pages
Lipo Battery Packs
PDF
No ratings yet
Lipo Battery Packs
7 pages
Raspberry Pi Projects
PDF
95% (21)
Raspberry Pi Projects
180 pages
Raspberry Pi For Beginners Oct 2023
PDF
No ratings yet
Raspberry Pi For Beginners Oct 2023
100 pages
rp2040 Datasheet
PDF
No ratings yet
rp2040 Datasheet
647 pages
Getting Started With Raspberry Pi: Embedded Systems Lab
PDF
No ratings yet
Getting Started With Raspberry Pi: Embedded Systems Lab
15 pages
10OfTheBestRaspberryPiZeroProjectsSoFar PDF
PDF
No ratings yet
10OfTheBestRaspberryPiZeroProjectsSoFar PDF
10 pages
ESP-WROOM-02: What Is The "Internet of Things"?
PDF
100% (2)
ESP-WROOM-02: What Is The "Internet of Things"?
7 pages
Arduino Mega 2560 r3 Starter Kit Q001151124
PDF
100% (2)
Arduino Mega 2560 r3 Starter Kit Q001151124
157 pages
ESP8266 NodeMCU With BME280 Gauges Chart
PDF
No ratings yet
ESP8266 NodeMCU With BME280 Gauges Chart
7 pages
Raspberry Pi For Beginners Ed14 2023
PDF
No ratings yet
Raspberry Pi For Beginners Ed14 2023
101 pages
RaspberryPi HW
PDF
No ratings yet
RaspberryPi HW
16 pages
Raspberry Pi Pico C SDK
PDF
100% (3)
Raspberry Pi Pico C SDK
271 pages
Arm Case-Study: The Raspberry Pi: Razvan Bogdan Microprocessor Systems
PDF
100% (2)
Arm Case-Study: The Raspberry Pi: Razvan Bogdan Microprocessor Systems
115 pages
Nuts and Volts - November 2009 (Malestrom)
PDF
No ratings yet
Nuts and Volts - November 2009 (Malestrom)
84 pages
Mag Pi 136
PDF
No ratings yet
Mag Pi 136
100 pages
Nuts and Volts 2022-02
PDF
No ratings yet
Nuts and Volts 2022-02
88 pages
How To Make A Multi-Function Arduino Robot - SriTu Hobby
PDF
No ratings yet
How To Make A Multi-Function Arduino Robot - SriTu Hobby
41 pages
Tbs Crossfire Manual
PDF
No ratings yet
Tbs Crossfire Manual
85 pages
Raspberry Pi Zero - Programming Over USB! (Part 2) - Andrew's Blog
PDF
100% (1)
Raspberry Pi Zero - Programming Over USB! (Part 2) - Andrew's Blog
72 pages
Circuit Cellar 353 2019
PDF
100% (2)
Circuit Cellar 353 2019
84 pages
Arduino ESP8266 Tutorial - Web Server Monitor Example
PDF
100% (2)
Arduino ESP8266 Tutorial - Web Server Monitor Example
7 pages
The Raspberry Pi Magazine - The MagPi. Issue 17
PDF
100% (2)
The Raspberry Pi Magazine - The MagPi. Issue 17
40 pages
Contents - Explore ATtiny Microcontrollers Using C and Assembly Language
PDF
100% (2)
Contents - Explore ATtiny Microcontrollers Using C and Assembly Language
15 pages
Connecting To The Internet With Pico W
PDF
No ratings yet
Connecting To The Internet With Pico W
30 pages
Electronic - Schematic Circuits For The Hobbyist
PDF
No ratings yet
Electronic - Schematic Circuits For The Hobbyist
159 pages
MagPi Magazine MagPi76
PDF
No ratings yet
MagPi Magazine MagPi76
100 pages
The Raspberry Pi Magazine - The MagPi. Issue 19
PDF
100% (1)
The Raspberry Pi Magazine - The MagPi. Issue 19
44 pages
SETUP of Mega2560+ESP8266-2
PDF
No ratings yet
SETUP of Mega2560+ESP8266-2
6 pages
Iot With Raspberry Pi
PDF
No ratings yet
Iot With Raspberry Pi
110 pages
Raspberry Pi The Complete Manual 6th Ed - 2016 UK PDF
PDF
No ratings yet
Raspberry Pi The Complete Manual 6th Ed - 2016 UK PDF
132 pages
Motor Arduino
PDF
No ratings yet
Motor Arduino
41 pages
Raspberry Pi For Beginners 7th Edition 2021
PDF
100% (1)
Raspberry Pi For Beginners 7th Edition 2021
100 pages
Distance Measurement Using Arduino Ultrasonic Sensor - Code & Circuit Diagram
PDF
100% (1)
Distance Measurement Using Arduino Ultrasonic Sensor - Code & Circuit Diagram
6 pages
Raspberry Pi For Beginners Ed19 2024
PDF
No ratings yet
Raspberry Pi For Beginners Ed19 2024
66 pages
Everything You Need To Know About NodeMCU
PDF
No ratings yet
Everything You Need To Know About NodeMCU
41 pages
Home Automation With Esp8266 Wifi Without Using Blynk!
PDF
100% (3)
Home Automation With Esp8266 Wifi Without Using Blynk!
20 pages
Adafruit Raspberry Pi Lesson 1 Preparing and SD Card For Your Raspberry Pi
PDF
100% (1)
Adafruit Raspberry Pi Lesson 1 Preparing and SD Card For Your Raspberry Pi
19 pages
Arduino Hello World
PDF
100% (1)
Arduino Hello World
6 pages
Drone Build Parts
PDF
No ratings yet
Drone Build Parts
7 pages
Building The SAP-3 Rev 2.0 PDF
PDF
No ratings yet
Building The SAP-3 Rev 2.0 PDF
58 pages
Smart Video Car For Raspberry Pi
PDF
No ratings yet
Smart Video Car For Raspberry Pi
67 pages
Contents Home Automation Projects With Arduino
PDF
No ratings yet
Contents Home Automation Projects With Arduino
4 pages
Gesture Robot
PDF
No ratings yet
Gesture Robot
11 pages
17 Service Manual - Packard Bell - Easynote Tm85 Tm86 Tm89
PDF
100% (3)
17 Service Manual - Packard Bell - Easynote Tm85 Tm86 Tm89
212 pages
Raspberry Pi
PDF
No ratings yet
Raspberry Pi
20 pages
Control Algorithm For A Biped Robot Based On Servo-Motors Controlled by An Android Application
PDF
No ratings yet
Control Algorithm For A Biped Robot Based On Servo-Motors Controlled by An Android Application
7 pages