Tag Archives: Raspberry Pi Resources

Raspberry Pi Christmas Shopping Guide 2019

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/raspberry-pi-christmas-shopping-guide-2019/

Stuck for what to buy your friends and family this Christmas? Whether you’re looking to introduce someone to Raspberry Pi and coding, or trying to find the perfect gift for the tech-mad hobbyist in your life, our Christmas Shopping Guide 2019 will help you complete your shopping list. So, let’s get started…

The good ol’ Raspberry Pi

They’ve asked for a Raspberry Pi but not told you which one they want? You know they like coding but don’t know where to start? They’re an avid baker and you think they may have spelt ‘pie’ wrong on their Christmas list? No problem, we’ve got you sorted.

Raspberry Pi 4 Desktop Kit

With everything you need to get started using Raspberry Pi 4, the Raspberry Pi 4 Desktop Kit contains our official mouse, keyboard with an integrated USB hub, USB-C power adapter, case, two micro HDMI leads, our Beginner’s Guide and, of course, the 4GB Raspberry Pi 4. Available from our Approved Resellers and the Raspberry Pi Store, Cambridge, the Desktop Kit is the perfect gift for anyone who’s wanting to get started with coding and digital making, or who’s simply looking to upgrade their current home computer to a smaller, less power-hungry setup.

Visit the Raspberry Pi Store, Cambridge, or find your nearest Approved Reseller online.

Raspberry Pi Zero W

Raspberry Pi Zero WH

The smallest Raspberry Pi still packs a punch despite its size and price. For $10, Raspberry Pi Zero W is perfect for embedding into projects and, with onboard Bluetooth and wireless LAN, there are fewer cables to worry about. Buy a Raspberry Pi Zero W with or without pre-soldered header pins, and pop it in someone’s stocking this Christmas as a great maker surprise.

Visit the Raspberry Pi Store, Cambridge, or find your nearest Approved Reseller online.

Get Started with Raspberry Pi 3A+

 

This isn’t just a book: it’s a book with a computer on the front. Getting Started with Raspberry Pi is a great gift for anyone curious about coding and, at £35, it’s a pretty affordable gift to give this festive season. Alongside the 116-page getting-started guide, the package also contains a Raspberry Pi 3A+, official case, and 16GB micro SD card pre-loaded with NOOBs. Raspberry Pi 3A+ can be powered with a good-quality micro USB phone charger, and it can be connected to any TV or computer display via standard HDMI. Grab a keyboard and mouse — you’ll be surprised how many people have a keyboard and mouse lying around — and you’re good to go!

Order your gift today from the Raspberry Pi Press online store, with international shipping available.

A full range of all Raspberry Pi variants, official accessories, and add-ons can be found on our products page.

A Raspberry Pie

Don’t be lazy, make your own!

Books

Raspberry Pi Press has released a small library’s worth of publications these last few months — have you ordered all your copies yet?





Pre-orders are now open for our glorious Code the Classics, so secure your copy now for the 13 December release date, with free UK shipping. And, while you’re on our Raspberry Pi Press page, check out our latest range of publications to suit all techy interests: Retro Gaming with Raspberry Pi will show the budding gamer in your life how to build their own Raspberry Pi retro arcade to play their Code the Classics favourites on, while Book of Making 2 and Raspberry Pi Projects Book 5 will inspire them to make all manner of amazing projects, from electronics and woodworking to crafts and rockets.


An Introduction to C and GUI programming by Simon Long

If they’re already full to the brim with Raspberry Pi, why not treat them to our Get Started with Arduino guide so they can expand upon their electronics skills. We also offer a host of established publications at discounted prices, including Sophy Wong’s Wearable Tech Projects, An Introduction to C & GUI Programming, and previous volumes of the Book of Making and the Raspberry Pi Projects Book.

Visit the Raspberry Pi Press online store, or head to the Raspberry Pi Store, Cambridge to find all our publications. You may also find a selection in your local WHSmith, Sainsbury’s, or Barnes & Noble.

Magazine subscriptions

Subscriptions are available for all of our magazines. 12-month subscribers to The MagPi magazine will receive a free Raspberry Pi, while a 12-month subscription to HackSpace magazine will net you a free Adafruit Circuit Playground Express.

Subscribers to Wireframe magazine, Custom PC magazine, and Digital SLR Photography will save up to 49% compared to newsstand prices, with many subscription options to choose from.

Babbage Bear

Everyone needs a Babbage Bear. Your new Babs will come complete with their own Raspberry Pi-branded shirt. And, with some felt, stuffing, and a stapler, you can make them as festive as ours in no time!

Order yours online, or buy Babbage at the Raspberry Pi Store, Cambridge.

Great third-party add-ons and essential kit

The Pi Hut’s 3D Xmas Tree

This newest iteration of The Pi Hut 3D Xmas Tree includes programmable RGB LEDs! Simply detach the two halves of the tree from their frame, slot them together, and place them onto the GPIO pins of your Raspberry Pi. With the provided libraries of code, the tree will be lit up and merry before you know it.

How about programming it to flash to your favourite Christmas song? Get yours today from The Pi Hut and the Raspberry Pi Store, Cambridge.

Pimoroni Pirate Radio

“Pirate Audio Speaker,” Pimoroni explain “is perfect for making a Lilliputian radio, sound effect player, or even as a teeny-weeny games console!”

Attach this HAT to any 40-pin Raspberry Pi and start creating a whole host of wonderful audio-visual projects — such as a Christmas #1 jukebox — to get you in the mood for your office party.

Available from the Pimoroni website and the Raspberry Pi Store, Cambridge.

PocketMoneyTronics GPIO Christmas Tree

This super-cute GPIO add-on allows users to write their own light shows via GPIO. Available for £4 from the Raspberry Pi Store, Cambridge, and the PocketMoneyTronics website, it’s a nice festive addition to any coders stocking.

Full instructions are provided with the kit, and are also available online. Buy the kit pre-soldered or loose, depending on your giftee’s soldering skills.

Visit the websites of all our Approved Resellers for more great Raspberry Pi gifts. Find your local Approved Reseller by selecting your country from the dropdown menu on any Raspberry Pi Products page.

Essential kit

Fill their maker kit this festive season, with a whole host of great components and tools. A soldering iron is a great way for coders to start bringing their projects out into the real world, allowing them to permanently add sensors, lights, buttons, etc. to their Raspberry Pi. They’ll also need one if they want to add header pins to the $5 Raspberry Pi Zero and $10 Raspberry Pi Zero W.

You can never have enough LEDs. Available in a variety of sizes and colours, you can find packs of LEDs online or in your local electronics store.

Never underestimate the importance of a cutting mat. Not only will it save your tabletop from craft knife cuts and soldering iron burns, but they also look great in photos for when its time to show of their latest project!

Amazon Smile

If you plan on making online purchases via Amazon, please consider selecting the Raspberry Pi Foundation via Amazon Smile! Your items will still be the same cost to you, but Amazon will donate a portion of the purchase price to help us continue to make free computer science education available to adults  and young people everywhere.

  • Amazon Smile for the UK
  • Amazon Smile for the US
  • For those of you based elsewhere, we’re pretty sure that you just need to add smile. before amazon in the Amazon web address you use in your country, so give that a try. If that doesn’t work, try searching for Amazon Smile via your prefered search engine.

Our gift to you

We wanted to give you a gift this festive season, so we asked the incredibly talented Sam Alder to design an illustration for you to print or use as your desktop wallpaper.

The poster is completely free for you to use and can be opened by clicking on the image above. We just ask that you don’t sell it, print it onto a t-shirt or mug, tattoo it onto your body, or manipulate it. But do feel free to print it as a poster for your home, classroom, or office, or to upload it as your computer wallpaper. And, when you do, be sure to take a photo and share it with us on social media.

You can also download a wider version of the image.

Happy gift-giving this 2019!

The post Raspberry Pi Christmas Shopping Guide 2019 appeared first on Raspberry Pi.

Pre-order Code the Classics today!

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/pre-order-code-the-classics-today/

Today, we are proud to announce Code the Classics, the latest (and long-awaited) publication from Raspberry Pi Press.

Pre-order Code the Classics today

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

Code the Classics

Code the Classics not only tells the stories of some of the seminal video games of the 1970s and 1980s, but shows you how to create your own games inspired by them using Python and Pygame Zero, following examples programmed by Raspberry Pi founder Eben Upton.

Get game design tips and tricks from the masters. Explore the code listings and find out how they work.

Learn how to code your own games with Pygame Zero. Download and play games examples by Eben Upton.

Pre-order Code the Classics today

Code the Classics is available to pre-order now from the Raspberry Pi Press online store, and it will be released in time for Christmas on 13 December. Pre-order today for FREE UK shipping.

Code the Classics is the perfect gift for anyone with fond memories of the video games of the 1970s and 1980s, and it’s also a brilliant way for young coders to get into understanding the code mechanics behind gaming, helping to inspire them to create their own.

The post Pre-order Code the Classics today! appeared first on Raspberry Pi.

Thermal testing Raspberry Pi 4

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/thermal-testing-raspberry-pi-4/

Raspberry Pi 4 just got a lot cooler! The last four months of firmware updates have taken over half a watt out of idle power and nearly a watt out of fully loaded power. For The MagPi magazine, Gareth Halfacree gets testing.

Raspberry Pi 4 Model B

Raspberry Pi 4 launched with a wealth of new features to tempt users into upgrading: a more powerful CPU and GPU, more memory, Gigabit Ethernet, and USB 3.0 support. More processing power means more electrical power, and Raspberry Pi 4 is the most power-hungry member of the family.

The launch of a new Raspberry Pi model is only the beginning of the story. Development is continuous, with new software and firmware improving each board long after it has rolled off the factory floor.

Raspberry Pi 4 updates

Raspberry Pi 4 is no exception: since launch, there has been a series of updates which have reduced its power needs and, in doing so, enabled it to run considerably cooler. These updates apply to any Raspberry Pi 4, whether you picked one up on launch day or are only just now making a purchase.

This feature takes a look at how each successive firmware release has improved Raspberry Pi 4, using a synthetic workload designed – unlike a real-world task – to make the system-on-chip (SoC) get as hot as possible in as short a time as possible.

Read on to see what wonders a simple firmware update can work.

How we tested Raspberry Pi 4 firmware revisions

To test how well each firmware revision handles the heat, a power-hungry synthetic workload was devised to represent a worst-case scenario: the stress-ng CPU stress-testing utility places all four CPU cores under heavy and continuous load. Meanwhile, the glxgears tool exercises the GPU. Both tools can be installed by typing the following at the Terminal:

sudo apt install stress-ng mesa-utils

The CPU workload can be run with the following command:

stress-ng --cpu 0 --cpu-method fft

The command will run for a full day at default settings; to cancel, press CTRL+C on the keyboard.

To run the GPU workload, type:

glxgears -fullscreen

This will display a 3D animation of moving gears, filling the entire screen. To close it, press ALT+F4 on the keyboard.

For more information on how both tools work, type:

man stress-ng
man glxgears

During the testing for this feature, both of the above workloads are run simultaneously for ten minutes. Afterwards, Raspberry Pi is allowed to cool for five minutes.

The thermal imagery was taken at idle, then again after 60 seconds of the stress-ng load alone.

Baseline test: Raspberry Pi 3B+

Already well established, Raspberry Pi 3 Model B+ was the device to beat

Before Raspberry Pi 4 came on the scene, Raspberry Pi 3 Model B+ was the must-have single-board computer. Benefiting from all the work that had gone into the earlier Raspberry Pi 3 Model B alongside improved hardware, Raspberry Pi 3B+ was – and still is – a popular device. Let’s see how well it performs before testing Raspberry Pi 4.

Power draw

An efficient processor and an improved design for the power circuitry compared to its predecessor help keep Raspberry Pi 3B+ power draw down: at idle, the board draws just 1.91W; when running the synthetic workload, that increases to 5.77W.

Thermal imaging


A thermal camera shows where the power goes. At idle, the system-on-chip is relatively cool while the combined USB and Ethernet controller to the middle-right is a noticeable hot spot; at load, measured after 60 seconds of a CPU-intensive synthetic workload, the SoC is by far the hottest component at 58.1°C.

Thermal throttling

This chart measures Raspberry Pi 3B+ CPU speed and temperature during a ten-minute power-intensive synthetic workload. The test runs on both the CPU and GPU, and is followed by a five-minute cooldown. Raspberry Pi 3B+ quickly reaches the ‘soft throttle’ point of 60°C, designed to prevent the SoC hitting the hard-throttle maximum limit of 80°C, and the CPU remains throttled at 1.2GHz for the duration of the benchmark run.

Raspberry Pi 4 Launch Firmware

The fastest Raspberry Pi ever made demanded the most power

Raspberry Pi 4 Model B launched with a range of improvements over Raspberry Pi 3B+, including a considerably more powerful CPU, a new GPU, up to four times the memory, and USB 3.0 ports. All that new hardware came at a cost: higher power draw and heat output. So let’s see how Raspberry Pi 4 performed at launch.

Power Draw

There’s no denying it, Raspberry Pi 4 was a hungry beast at launch. Even idling at the Raspbian desktop, the board draws 2.89W, hitting a peak of 7.28W under a worst-case synthetic CPU and GPU workload – a hefty increase over Raspberry Pi 3 B+.

Thermal Imaging


Thermal imaging shows that Raspberry Pi 4, using the launch-day firmware, runs hot even at idle, with hot spots at the USB controller to the middle-right and power-management circuitry to the bottom-left. Under a heavy synthetic load, the SoC hits 72.1°C by the 60-second mark.

Thermal Throttling

Raspberry Pi 4 manages to go longer than Raspberry Pi 3 B+ before the synthetic workload causes it to throttle; but throttle it does after just 65 seconds. As the workload runs, the CPU drops from 1.5GHz to a stable 1GHz, then dips as low as 750MHz towards the end.

Raspberry Pi 4 VLI Firmware

USB power management brings some relief for Raspberry Pi heat

The first major firmware update developed for Raspberry Pi 4 brought power management features to the Via Labs Inc. (VLI) USB controller. The VLI controller is responsible for handling the two USB 3.0 ports, and the firmware update allowed it to run cooler.

Power Draw

Even without anything connected to Raspberry Pi 4’s USB 3.0 ports, the VLI firmware upgrade has a noticeable impact: idle power draw has dropped to 2.62W, while the worst-case draw under a heavy synthetic workload sits at 7.01W.

Thermal Imaging


The biggest impact on heat is seen, unsurprisingly, on the VLI chip to the middle-right; the VLI firmware helps keep the SoC in the centre and the power-management circuitry at the bottom-left cooler than the launch firmware. The SoC reached 71.4°C under load – a small, but measurable, improvement.

Thermal Throttling

Enabling power management on the VLI chip has a dramatic impact on performance in the worst-case synthetic workload: the throttle point is pushed back to 77 seconds, the CPU spends more time at its full 1.5GHz speed, and it doesn’t drop to 750MHz at all. The SoC also cools marginally more rapidly at the end of the test.

Raspberry Pi 4 VLI, SDRAM firmware

With VLI tamed, it’s the memory’s turn now

The next firmware update, designed to be used alongside the VLI power management features, changes how Raspberry Pi 4’s memory – LPDDR4 SDRAM – operates. While having no impact on performance, it helps to push the power draw down still further at both idle and load.

Power Draw

As with the VLI update, the SDRAM update brings a welcome drop in power draw at both idle and load. Raspberry Pi 4 now draws 2.47W at idle and 6.79W running a worst-case synthetic load – a real improvement from the 7.28W at launch.

Thermal Imaging


Thermal imaging shows the biggest improvement yet, with both the SoC and the power-management circuitry running considerably cooler at idle after the installation of this update. After 60 seconds of load, the SoC is noticeably cooler at 68.8°C – a drop of nearly 3°C over the VLI firmware alone.

Thermal Throttling

A cooler SoC means better performance: the throttle point under the worst-case synthetic workload is pushed back to 109 seconds, after which Raspberry Pi 4 continues to bounce between full 1.5GHz and throttled 1GHz speeds for the entire ten-minute benchmark run – bringing the average speed up considerably.

Raspberry Pi 4 VLI, SDRAM, Clocking, and Load-Step Firmware

September 2019’s firmware update includes several changes, while bringing with it the VLI power management and SDRAM firmware updates. The biggest change is how the BCM2711B0 SoC on Raspberry Pi 4 increases and decreases its clock-speed in response to demand and temperature.

Power Draw

The September firmware update has incremental improvements: idle power draw is down to 2.36W and load under the worst-case synthetic workload to a peak of 6.67W, all without any reduction in raw performance or loss of functionality.

Thermal Imaging


Improved processor clocking brings a noticeable drop in idle temperature throughout the circuit board. At load, everything’s improved – the SoC peaked at 65°C after 60 seconds of the synthetic workload, while both the VLI chip and the power-management circuitry are clearly cooler than under previous firmwares.

Thermal Throttling

With this firmware, Raspberry Pi 4’s throttle point under the worst-case synthetic workload is pushed back all the way to 155 seconds – more than double the time the launch-day firmware took to hit the same point. The overall average speed is also brought up, thanks to more aggressive clocking back up to 1.5GHz.

Raspberry Pi 4 Beta Firmware

Currently in testing, this beta release is cutting-edge

Nobody at Raspberry Pi is resting on their laurels. Beta firmware is in testing and due for public release soon. It brings with it many improvements, including finer-grained control over SoC operating voltages and optimised clocking for the HDMI video state machines.

To upgrade your Raspberry Pi to the latest firmware, open a Terminal window and enter:

sudo apt update
sudo apt full-upgrade

Now restart Raspberry Pi using:

sudo shutdown - r now

Power Draw

The beta firmware decreases power draw at idle to reduce overall power usage, while tweaking the voltage of the SoC to drop power draw at load without harming performance. The result: a drop to 2.1W idle, and 6.41W at load – the best yet.

Thermal Imaging


The improvements made at idle are clear to see on thermal imaging: the majority of Raspberry Pi 4’s circuit board is below the bottom 35°C measurement point for the first time. After 60 seconds of load, there’s a smaller but still measurable improvement, with a peak measured temperature of 64.8°C.

Thermal Throttling

While Raspberry Pi 4 does still throttle with the beta firmware, thanks to the heavy demands of the synthetic workload used for testing, it delivers the best results yet: throttling occurs at the 177s mark while the new clocking controls bring the average clock speed up markedly. The firmware also allows Raspberry Pi 4 to up-clock more at idle, improving the performance of background tasks.

Keep cool with Raspberry Pi 4 orientation

Firmware upgrades offer great gains, but what about putting Raspberry Pi on its side?

While running the latest firmware will result in considerable power draw and heat management improvements, there’s a trick to unlock even greater gains: adjusting the orientation of Raspberry Pi. For this test, Raspberry Pi 4 with the beta firmware installed was stood upright with the GPIO header at the bottom and the power and HDMI ports at the top.

Thermal Throttling

Simply moving Raspberry Pi 4 into a vertical orientation has an immediate impact: the SoC idles around 2°C lower than the previous best and heats a lot more slowly – allowing it to run the synthetic workload for longer without throttling and maintain a dramatically improved average clock speed.

There are several factors at work: having the components oriented vertically improves convection, allowing the surrounding air to draw the heat away more quickly, while lifting the rear of the board from a heat-insulating desk surface dramatically increases the available surface area for cooling.

Throttle Point Timing

This chart shows how long it took to reach the throttle point under the synthetic workload. Raspberry Pi 3B+ sits at the bottom, soft-throttling after just 19 seconds. Each successive firmware update for Raspberry Pi 4, meanwhile, pushes the throttle point further and further – though the biggest impact can be achieved simply by adjusting Raspberry Pi’s orientation.

Real World Testing

Synthetic benchmarks aside, how do the boards perform with real workloads?

Looking at the previous pages, it’s hard to get a real idea of the difference in performance between Raspberry Pi 3B+ and Raspberry Pi 4. The synthetic benchmark chosen for the thermal throttle tests performs power-hungry operations which are rarely seen in real-world workloads, and repeats them over and over again with no end.

Compiling Linux

In this test, both Raspberry Pi 3B+ and Raspberry Pi 4 are given the task of compiling the Linux kernel from its source code. It’s a good example of a CPU-heavy workload which occurs in the real world, and is much more realistic than the deliberately taxing synthetic workload of earlier tests.

With this workload, Raspberry Pi 4 easily emerges the victor. Despite its CPU running only 100MHz faster than Raspberry Pi 3B+ at its full speed, it’s considerably more efficient – and, combined with the ability to run without hitting its thermal throttle point, completes the task in nearly half the time.

Kernel compile: Raspberry Pi 3B+

Raspberry Pi 3B+ throttles very early on in the benchmark compilation test and remains at a steady 1.2GHz until a brief period of cooling, as the compiler switches from a CPU-heavy workload to a storage-heavy workload, allows it to briefly spike back to its 1.4GHz default again. Compilation finished in 5097 seconds – one hour, 24 minutes, and 57 seconds.

Kernel compile: Raspberry Pi 4 model B

The difference between the synthetic and real-world workloads is clear to see: at no point during the compilation did Raspberry Pi 4 reach a high enough temperature to throttle, remaining at its full 1.5GHz throughout – bar, as with Raspberry Pi 3 B+, a brief period when a change in compiler workload allowed it to drop to its idle speeds. Compilation finished in 2660 seconds – 44 minutes and 20 seconds.

Get The MagPi magazine issue 88 now

This article is from today’s brand-new issue of The MagPi magazine, the official Raspberry Pi magazine. Buy it from all good newsagents, Raspberry Pi Press, and the Raspberry Pi Store, Cambridge.

Subscribe to pay less per issue and support our work, or download the free PDF to give it a try first.

The post Thermal testing Raspberry Pi 4 appeared first on Raspberry Pi.

What do you use your Raspberry Pi for?

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/what-do-you-use-your-raspberry-pi-for/

Our very own Brian made this lovely What is a Raspberry Pi? video for our YouTube channel. Thanks, Brian.

What is a Pi FINAL

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

What do you do with your Raspberry Pi? Use #IUseMyRaspberryPiFor on social media so we can see!

The post What do you use your Raspberry Pi for? appeared first on Raspberry Pi.

Get started with… Arduino?

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/get-started-ardunio/

Yes, you read that title right, and no, you haven’t accidentally stumbled upon the Arduino Foundation’s website. Today, we’re pleased to announce a new addition to the Raspberry Pi Press family: Get Started with Arduino, a complete how-to guide to help you get hands on with the other pocket-sized board.

But why?

Why not? Our mission is to put the power of computing and digital making into the hands of people all over the world. Whether you’re using a Raspberry Pi, an Arduino, or any other piece of digital making kit, if you’re creating with tech, we’re happy. And Raspberry Pi and Arduino make wonderful project partners for all kinds of build.

What’s in the book?

Get Started with Arduino is packed full of how-tos and project tutorials to help you get better acquainted with the little blue microcontroller. Whether you’re brand new to digital making, a die-hard Raspberry Pi fan looking to expand your maker skillset, or simply a bit of a bookworm, Get Started with Arduino is a super addition to your bookshelves.


Aren’t Raspberry Pi and Arduino the same kind of thing?

Arduino is a microcontroller, while Raspberry Pi is a full computer. Microcontrollers don’t usually run a mainstream operating system, but they’re extremely power-efficient, so they can be great for projects that can’t stay plugged into the mains. You need to use a separate computer to set up your Arduino, but you can do everything on a Raspberry Pi itself… including setting up an Arduino. As we said, the two work really well together in some projects: for example, you might build a robot where the Raspberry Pi handles intensive processing tasks and provides you with a friendly environment for developing your code, while the Arduino handles precise real-time control of the motors.

Buy Get Started with Arduino today

Get Started with Arduino is out now! It’s available from the Raspberry Pi Press website with free international shipping, from the Raspberry Pi Store in Cambridge, and from WHSmith in the UK; it’ll reach Barnes & Noble stores in the US in a week or so.

Also out today…

HackSpace magazine issue #25 is also out today, available from the Raspberry Pi Press website, the Raspberry Pi Store in Cambridge, and every newsagent that’s worth its salt.

And, if that’s not enough, Wireframe magazine issue 27 is also out today, and it too is available from Raspberry Pi Press, the Raspberry Pi Store, and newsagents across the UK.

But wait, there’s more!

In case you missed it, on Monday we released Retro Gaming with Raspberry Pi, your one-stop guide to creating and playing classic retro games on your Raspberry Pi.

Did someone say free?

For getting this far in today’s blog, here’s your reward: Get Started with Arduino, HackSpace magazine, Wireframe magazine and Retro Gaming with Raspberry Pi are all available as free PDF downloads. However, when you buy our publications, you’re supporting the work of the Raspberry Pi Foundation to bring computing to everyone, as well as the continued production of even more great magazines and special edition books. So, you know what to do.

The post Get started with… Arduino? appeared first on Raspberry Pi.

New book: Retro Gaming with Raspberry Pi

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/new-book-retro-gaming-with-raspberry-pi/

Raspberry Pi Press is delighted to announce the release of the latest addition to your bookshelf: Retro Gaming with Raspberry Pi!

Retro Gaming with Raspberry Pi

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

Retro Gaming with Raspberry Pi

This 164-page book shows you how to set up a Raspberry Pi to play classic games; and how to build your own portable console, a full-size arcade cabinet, and a pinball machine with clear step-by-step guides.

Learn how to program your own games

You’ll learn how to program your own games using Python and Pygame Zero, allowing you to recreate some of your favourite retro games, as well as learning how lines of code can produce gorgeous graphics and hours of nostalgia-driven fun.



If that’s not enough, you’ll also find reviews of some of the best retro gamer kit, such as cases and controllers; tips on setting up emulators; and showcases of some gorgeous retro-fit Raspberry Pi systems.



Get it now

If you’d like to buy Retro Gaming with Raspberry Pi as a physical book (and we do recommend you do – it’ll make a fantastic stocking-filler), you can purchase it now from the Raspberry Pi Press website with free international shipping, or from the Raspberry Pi Store, Cambridge.

As with all Raspberry Pi Press publications, Retro Gaming with Raspberry Pi is available now as a free PDF, ready for you to download from The MagPi website.

The post New book: Retro Gaming with Raspberry Pi appeared first on Raspberry Pi.

What’s inside the Raspberry Pi 4 Desktop Kit?

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/whats-inside-the-raspberry-pi-4-desktop-kit/

The Raspberry Pi 4 Desktop Kit is the perfect gift for any budding maker, coder, or Raspberry Pi fanatic. Get yours today from Raspberry Pi Approved Resellers across the globe, and the Raspberry Pi Store, Cambridge.

What’s inside the Raspberry Pi 4 Desktop Kit?

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

What’s inside?

The Official Raspberry Pi 4 Desktop Kit includes all you need to hook up your Raspberry Pi to an HDMI monitor or TV and get started.

Raspberry Pi Desktop Kit

Raspberry Pi 4 4GB

Released earlier this year, the Raspberry Pi 4 is the latest development from the Raspberry Pi team. Available in 1GB, 2GB and 4GB variants, the Raspberry Pi Desktop Kit is powerful enough to replace your humble desktop computer.

Official Raspberry Pi keyboard

Snazzy Raspberry Pi keyboard

Designed with Raspberry Pi users in mind, the new official keyboard is both aesthetically and functionally pleasing. Available in various language layouts, the keyboard also contains a USB hub, allowing for better cable management on the go.

Official Raspberry Pi mouse

Natty Raspberry Pi mouse

Light-weight and comfortable to use, the official mouse is the perfect pairing for our keyboard.

Official Raspberry Pi case

Or this side?

Protect your Raspberry Pi from dust and tea spills with the newly-designed Raspberry Pi 4 case. How did we design it? Find out more here.

Official Raspberry Pi Beginners Guide

Updated for the new Raspberry Pi 4, our Official Beginners Guide contains all the information needed to get up and running with your new computer and provides several projects to introduce you to the world of coding. It’s great, but don’t take our word for it; Wired said “The beginners guide that comes with the Desktop Kit is the nicest documentation I’ve seen with any hardware, possibly ever. ”

Official Raspberry Pi USB-C Power Adapter

We’ve updated the Raspberry Pis power supply to USB-C, allowing your new computer to receive all the juice it needs to run while supporting add-ons like HATs and other components.

16GB micro SD Card with NOOBS

Plugin and get started. With the NOOBS pre-loaded on a micro SD card, you can get up and running straight away, without the need to spend time installing your OS.

2x Raspberry Pi Micro HDMI leads

Two?! The Raspberry Pi 4 includes two micro HDMI connectors, which means you can run two monitors from one device.

The immense feeling of joy that you’re making a difference in the world

We’re a charity. 100% of the profit we make when you purchase official Raspberry Pi products goes to support the work of the Raspberry Pi Foundation, and its mission to put the power of computing and digital making into the hands of people all over the world. Thank you!

Get your Raspberry Pi 4 Desktop Kit

To find your nearest Raspberry Pi Approved reseller, visit our products page or the Raspberry Pi Store, Cambridge. We’re constantly working with new suppliers to ensure more availability of Raspberry Pi products across the world.

BONUS: Un-unboxing video for Christmas

Un-unboxing the Raspberry Pi 4 Desktop Kit

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

 

The post What’s inside the Raspberry Pi 4 Desktop Kit? appeared first on Raspberry Pi.

Secret Santa ideas for the Raspberry Pi fan in your office

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/secret-santa-ideas-for-the-raspberry-pi-fan-in-your-office/

Today’s blog post started as a deflated “What do I buy my Secret Santa person?” appeal from a friend last night. My answer is this, a nice and early Secret Santa idea guide for anyone stuck with someone for whom they have no idea what to buy.

All the gifts listed below cost £10 or less, and they’re all available from the Raspberry Pi store in Cambridge, UK. Many of them are also available to buy online, but if you’re able to visit our store, you definitely should – we have a couple of in-store exclusives on offer too.

Gifts for £5 or less

If your Secret Santa limit is set at £5, as many seem to be, we’ve a few ideas that will fit nicely within your budget.

Raspberry Pi Zero

We’ll start with the obvious: Raspberry Pi Zero, our tiny computer that packs a punch without leaving a dent in your finances. At bang on £5, anyone of the electronics/techie persuasion will be delighted to receive this at the office Christmas party.

Raspberry Pi pin badge and sticker pack

Help your Secret Santa pick show their love for Raspberry Pi with a Raspberry Pi pin (£3) or sticker pack (£4). They’ll be as on-brand as Pete Lomas (and that’s saying something).

CamJam Edukit #1

The CamJam Edukit #1 is jam-packed with all the bits you need to get started with digital making, and it’s supported by free downloadable worksheets. It’s a fantastic gift for anyone who’d enjoy learning electronics or expanding their coding know-how. At £5, you can’t go wrong.

Essentials Guides

At £3.99 each, the Essentials Guides cover a range of topics, including Learning to code with C, Hacking and making in Minecraft, and Making games in Python. Our in-store offer will score you three guides for £10, which brings us nicely to…

Gifts up to £10

A £10 budget? Check you out!

Raspberry Pi Zero W

With added wireless LAN and Bluetooth connectivity, Raspberry Pi Zero W will cost you £9.50, leaving you 50p to buy yourself some sweets for a job well done.

Babbage Bear and friends

Babbage Bear, for many the face of Raspberry Pi, is the perfect gift for all ages. He’ll cost you £9, as will any of his Adafruit friends.

Mugs and travel cups

What do you buy for the Raspberry Pi fan who has everything? A store-exclusive travel cup. At £8 each, our branded drinkware is rather swell, even if we do say so ourselves.

HackSpace: Wearable tech projects (and other books)

Ranging in price from £3.99 to around £15, our Raspberry Pi Press books and magazines are a great gift for anyone looking to learn more about making, electronics, or video gaming.

Raspberry Pi Beginner’s Guide

If you’ve heard your Secret Santa match mention that they like tinkering and making in their spare time, but you don’t think they’ve tried Raspberry Pi yet, this is the book for them. Updated to include the new Raspberry Pi 4 and upgrades to Scratch 3, our Beginner’s Guide will help them get started with this fabulous addition to their toolkit.

If you’re feeling generous…

These gifts are a little more than £10, and worth every penny. They’d make the perfect gift for anyone who loves making and Raspberry Pi.

Bearable badge kits


The Bearable badges are cute, light-activated LED badges that require no soldering or external computers. Instead, the kit uses conductive thread and sensors, making it a wonderful maker project for anyone, whether or not they’ve done any electronics before. Choose between an adorable sleepy fox and a lovable little bear, both at £15.

3D Xmas Tree

Available both as a pre-soldered kit (£15) and as a solder-yourself kit (£12), the 3D Xmas Tree is the ultimate festive HAT for Raspberry Pi. Once it’s assembled, you can use pre-written code to light it up, or code your own light show.

Still not sure?

The Raspberry Pi Store now offers gift cards, giving your giftee the chance to pick their own present. Add whatever value you’d like from a minimum of £5, and watch them grin with glee as they begin to plan their next project.

Plus, our wonderful Jack has designed these rather lovely Christmas tote bags, available exclusively in store and as a limited run!

But wait, there’s more!

We’ll be publishing our traditional Raspberry Pi gift guide soon. It’ll include all the tech and cool maker stuff your nearest and dearest will love to receive this holiday season, with links to buy online. If you think there’s something we shouldn’t miss, let us know in the comments below.

The post Secret Santa ideas for the Raspberry Pi fan in your office appeared first on Raspberry Pi.

New book (with added computer): Get Started with Raspberry Pi

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/new-book-get-started-with-raspberry-pi/

The Raspberry Pi Press is really excited to announce the release of Get Started with Raspberry Pi. This isn’t just a book about a computer: it’s a book with a computer.

Ideal for beginners, this official guide and starter kit contains everything you need to get started with Raspberry Pi.

Inside you’ll find a Raspberry Pi 3A+, the official case, and a 16GB microSD memory card – preloaded with NOOBS, containing the Raspbian operating system. The accompanying 116-page book is packed with beginner’s guides to help you master your new Raspberry Pi!

  • Set up your new Raspberry Pi 3A+ for the first time.
  • Discover amazing software built for creative learning.
  • Learn how to program in Scratch and Python.
  • Control electronics: buttons, lights, and sensors.

A brilliant Christmas gift idea, it’s available now in the Raspberry Pi Press store. As always, we have also released the guide as a free PDF – minus the 3A+, case and SD card, of course!

Raspberry Pi Beginner’s Guide 3rd Edition

And that’s not all! We have also created a new edition of our popular Raspberry Pi Beginner’s Guide book.

As well as covering Raspberry Pi 4, this 252-page book features programming and physical computing projects updated for Scratch 3, which is available in the latest version of Raspbian.

It’s available now in the Raspberry Pi Press Store, with free worldwide delivery. And, as always, you can also download a free PDF version.

Free downloads: why?

Curious minds should make note that Raspberry Pi Press releases free downloadable PDFs of all publications on launch day. Why? Because, in line with our mission statement, we want to put the power of computing and digital making into the hands of people all over the world, and that includes the wealth of information we publish as part of Raspberry Pi Press.

We publish new issues of Wireframe magazine every two weeks, new issues of HackSpace magazine and The MagPi magazine every month, and project books such as The Book of Making, Wearable Tech Projects, and An Introduction to C & GUI Programming throughout the year.

If you’d like to own a physical copy of any of our publications, we offer free international shipping across our product range. You’ll also find many of our magazines in top UK supermarkets and newsagents, and in Barnes and Noble in the US.

 

The post New book (with added computer): Get Started with Raspberry Pi appeared first on Raspberry Pi.

Try our new free machine learning projects for Scratch

Post Syndicated from Daragh Broderick original https://www.raspberrypi.org/blog/free-machine-learning-projects-for-scratch/

Machine learning is everywhere. It’s used for image and voice recognition, predictions, and even those pesky adverts that always seem to know what you’re thinking about!

If you’ve ever wanted to know more about machine learning, or if you want to help you learners get started with machine learning, then our new free projects are for you!

The Terminator saying "My CPU is a neural net processor. A learning computer."

Spoiler alert: we won’t show you how to build your own Terminator. Trust us, it’s for the best.

Machine learning in education

When we hosted Scratch Conference Europe this summer, machine learning was the talk of the town: all of the machine learning talks and workshops were full with educators eager to learn more and find out how to teach machine learning. So this is the perfect time to bring some free machine learning resources to our projects site!

Smart classroom assistant

Smart classroom assistant is about creating your own virtual smart devices. You will create a machine learning model that recognises text commands, such as “fan on”, “Turn on my fan”, or my personal favourite, “It’s roasting in here!”.

animation of a fan running and a desk lamp turning on and off

In the project, you will be guided through setting up commands for a desk fan and lamp, but you could pick all sorts of virtual devices — and you can even try setting up a real one! What will you choose?

Journey to school

Journey to school lets you become a psychic! Well, not exactly — but you will be able to predict how your friends travel from A to B.

illustration of kids in school uniforms in front of a large street map

By doing a survey and collecting lots of information from your friends about how they travel around, you can train the computer to look for patterns in the numbers and predict how your friends travel between places. When you have perfected your machine learning model, you can try using it in Scratch too!

Alien language

Did you ever make up your own secret language that only you understood? Just me? Well, in the Alien language project you can teach your computer to understand your made-up words. You can record lots of examples to teach it to understand ‘left’ and ‘right’ and then use your model in Scratch to move a character with your voice!
animation of a cute alien creature on the surface of distant planet

Train your model to recognise as many sounds as you like, and then create games where the characters are voice-controlled!

Did you like it?

In the Did you like it? project, you create a character in Scratch that will recognise whether you enjoyed something or not, based on what you type. You will train your character by giving it some examples of positive and negative comments, then watch it determine how you are feeling. Once you have mastered that, you can train it to reply, or to recognise other types of messages too. Soon enough, you will have made your very own sentiment analysis tool!

illustration of kids with a computer, robot, and erlenmeyer flask

More machine learning resources

We’d like to extend a massive thank you to Dale from Machine Learning for Kids for his help with bringing these projects to our projects site. Machine Learning for Kids is a fantastic website for finding out more about machine learning, and it has loads more great projects for you to try, so make sure you check it out!

The post Try our new free machine learning projects for Scratch appeared first on Raspberry Pi.

A rather snazzy Raspberry Pi 4 wallpaper for your phone and computer

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/snazzy-raspberry-pi-4-wallpaper-phone-computer/

Fiacre took a rather snazzy photo of a Raspberry Pi 4, and he liked it so much that he set it as his iPhone’s wallpaper.

And we liked it so much that we asked him to produce size variants so we could share them with all of you.

You’ll find three variants of the image below: smartphone, 1920×1200, 4K. Just click on the appropriate image to be redirected to the full-resolution version.



Standard rules apply: these images are for personal use only and are not to be manipulated or sold.

Should we create more snazzy wallpapers of Raspberry Pi? Lets us know in the comments, and we’ll get Fiacre to work.

The post A rather snazzy Raspberry Pi 4 wallpaper for your phone and computer appeared first on Raspberry Pi.

Keynote speeches from Scratch Conference Europe 2019

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/keynote-speeches-scratch-conference-europe-2019/

This weekend, the Raspberry Pi Foundation hosted Scratch Conference Europe 2019 at Churchill College in Cambridge, UK.

Framing the busy weekend’s schedule were presentations from:

  • Massachusetts Institute of Technology (MIT) Media Lab’s Mitchel Resnick, co-inventor of Scratch himself
  • Science presenter Neil Monterio
  • Raspberry Pi favourite, the fire-loving Fran Scott

Since not everyone was able to travel to Cambridge to attend the conference, we wanted to make sure you’re not missing out, so we filmed their presentations, for you to watch at your leisure.

For the full Scratch Conference experience, we suggest gathering together a group of like-minded people to watch the videos and discuss your thoughts. Alternatively, use #ScratchEurope on Twitter to join in the conversation with the conference attendees online.

Enjoy!

Mitch Resnick presents at Scratch Conference Europe 2019

Mitch Resnick addresses the attendees of Scratch Conference Europe, hosted by the Raspberry Pi Foundation at Churchill College, Cambridge, UK on 24 August 2019.

Neil Monteiro presents at Scratch Conference Europe 2019

Neil Monteiro closes the show on day two of Scratch Conference Europe, hosted by the Raspberry Pi Foundation at Churchill College, Cambridge, UK on 24 August 2019. In this show, Neil takes the audience on a journey into a dangerous labyrinth…in code!

Fran Scott presents at Scratch Conference Europe 2019

Fran Scott closes the show on day three of Scratch Conference Europe, hosted by the Raspberry Pi Foundation at Churchill College, Cambridge, UK on 25 August 2019.

 

The post Keynote speeches from Scratch Conference Europe 2019 appeared first on Raspberry Pi.

Scratch 3 Desktop for Raspbian on Raspberry Pi

Post Syndicated from Martin O'Hanlon original https://www.raspberrypi.org/blog/scratch-3-desktop-for-raspbian-on-raspberry-pi/

You can now install and use Scratch 3 Desktop for Raspbian on your Raspberry Pi!

Scratch 3

Scratch 3 was released in January this year, and since then we and the Scratch team have put lots of work into creating an offline version for Raspberry Pi.

The new version of Scratch has a significantly improved interface and better functionality compared to previous versions. These improvements come at the cost of needing more processing power to run. Luckily, Raspberry Pi 4 has delivered just that, and with the software improvements in the newest version of Raspbian, Buster, we can now deliver a reliable Scratch 3 experience on our computer.

Which Raspberry Pi can I use?

Scratch 3 needs at least 1GB of RAM to run, and we recommend a Raspberry Pi 4 with 2GB+ RAM. While you can run Scratch 3 on a Raspberry Pi 2, 3, 3B+, or a Raspberry 4 with 1GB RAM, performance on these models is reduced, and depending on what other software you run at the same time, Scratch 3 may fail to start due to lack of memory.

The Scratch team is working to reduce the memory requirements of Scratch 3, so we will hopefully see improvements to this soon.

How to install Scratch 3

You can only install Scratch 3 on Raspbian Buster.

First, update Raspbian!

  • If you’ve yet to upgrade to Raspbian Buster, we recommend installing a fresh version of Buster onto your SD card instead of upgrading from your current version of Raspbian.
  • If you’re already using Raspbian Buster, but you’re not sure your running the latest version, update Buster by following this tutorial:

How to update Raspbian on your Raspberry Pi

How to update to the latest version of Raspbian on your Raspberry Pi.

Once you’re running the latest version of Buster, you can install Scratch 3 either using the Recommended Software application or apt on the terminal.

How to install Scratch 3 using the Recommended Software app

Open up the menu, click on Preferences > Recommended Software, and then select Scratch 3 and click on OK.

How to install Scratch 3 using the terminal

Open a terminal window, and type in and run the following commands:

sudo apt-get update
sudo apt-get install scratch3

What can I do with Scratch 3 and Raspberry Pi?

Scratch 3 Desktop for Raspbian comes with new extensions to allow you to control the GPIO pins and Sense HAT with Scratch code!

GPIO extension

GPIO extension is a replacement for the existing extension in Scratch 2. Its layout and functionality is very similar, so you can use it as a drop-in replacement.

The GPIO extension gives you the flexibility to connect and control a whole host of electronic devices.

Simple Electronics extension

If you are looking to add something simple, like an LED or button controller for a game, you should find the new Simple Electronics extension easier to use than the GPIO extension. The Simple Electronics extension is the first version of a beginner-friendly extension for interacting with Raspberry Pi’s GPIO pins. Taking lessons from the implementation of gpiozero for Python, this new extension provides a simpler way of using electronic components: currently buttons and LEDs.

In this example, an LED connected to GPIO pin 17 is controlled by a button connected between pin 2 and GND.

Sense HAT extension

We’ve improved the Sense HAT extension to take advantage of new features in Scratch 3, and the updated version of the extension also introduces a number of new blocks to allow you to:

  • Sense tilting, shaking, and orientation
  • Use the joystick
  • Measure temperature, pressure, and humidity
  • Display text, characters, and patterns on the LED matrix

micro:bit and LEGO extensions

The micro:bit and LEGO extensions will become available later on Scratch 3 Desktop. This is because Scratch Link, the software which allows Scratch to talk to Bluetooth devices, is not yet available for Linux-type operating systems like Raspbian. A version of Scratch Link for Raspbian is part of our plans but, as yet, we don’t have a release date.

A round of thanks

It has been a long ambition of both the Scratch and Raspberry Pi teams to have Scratch 3 running on Raspberry Pi, and it’s amazing to see it released!

A big thank you to Raspberry Pi engineer Simon Long for building and packaging Scratch 3, and to the Scratch team for their support in getting over some of the problems we faced along the way.

The post Scratch 3 Desktop for Raspbian on Raspberry Pi appeared first on Raspberry Pi.

Build a Raspberry Pi music box with Sally Le Page

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/build-a-raspberry-pi-music-box-with-sally-le-page/

Connecting buttons to the GPIO pins of your Raspberry Pi instantly opens up your digital making to the world of clicky funtimes.

Sally Le Page

Our Music Box project teaches you how to connect several buttons to your Raspberry Pi and write code to make them trigger cool sound effects.

It’s fun. It’s easy. And we roped Sally Le Page into helping us show you how you can do it yourself, in your own home!

Here Sally is, and here’s the link to the updated online project for you to get stuck into.

Build a Raspberry Pi music box ft. Dr Sally Le Page

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

The post Build a Raspberry Pi music box with Sally Le Page appeared first on Raspberry Pi.

Monitor air quality with a Raspberry Pi

Post Syndicated from Andrew Gregory original https://www.raspberrypi.org/blog/monitor-air-quality-with-a-raspberry-pi/

Add a sensor and some Python 3 to your Raspberry Pi to keep tabs on your local air pollution, in the project taken from Hackspace magazine issue 21.

Air is the very stuff we breathe. It’s about 78% nitrogen, 21% oxygen, and 1% argon, and then there’s the assorted ‘other’ bits and pieces – many of which have been spewed out by humans and our related machinery. Carbon dioxide is obviously an important polluter for climate change, but there are other bits we should be concerned about for our health, including particulate matter. This is just really small bits of stuff, like soot and smog. They’re grouped together based on their size – the most important, from a health perspective, are those that are smaller than 2.5 microns in width (known as PM2.5), and PM10, which are between 10 and 2.5 microns in width. This pollution is linked with respiratory illness, heart disease, and lung cancer.

Obviously, this is something that’s important to know about, but it’s something that – here in the UK – we have relatively little data on. While there are official sensors in most major towns and cities, the effects can be very localised around busy roads and trapped in valleys. How does the particular make-up of your area affect your air quality? We set out to monitor our environment to see how concerned we should be about our local air.

Getting started

We picked the SDS011 sensor for our project (see ‘Picking a sensor’ below for details on why). This sends output via a binary data format on a serial port. You can read this serial connection directly if you’re using a controller with a UART, but the sensors also usually come with a USB-to-serial connector, allowing you to plug it into any modern computer and read the data.

The USB-to-serial connector makes it easy to connect the sensor to a computer

The very simplest way of using this is to connect it to a computer. You can read the sensor values with software such as DustViewerSharp. If you’re just interested in reading data occasionally, this is a perfectly fine way of using the sensor, but we want a continuous monitoring station – and we didn’t want to leave our laptop in one place, running all the time. When it comes to small, low-power boards with USB ports, there’s one that always springs to mind – the Raspberry Pi.

First, you’ll need a Raspberry Pi (any version) that’s set up with the latest version of Raspbian, connected to your local network, and ideally with SSH enabled. If you’re unsure how to do this, there’s guidance on the Raspberry Pi website.

The wiring for this project is just about the simplest we’ll ever do: connect the SDS011 to the Raspberry Pi with the serial adapter, then plug the Raspberry Pi into a power source.

Before getting started on the code, we also need to set up a data repository. You can store your data wherever you like – on the SD card, or upload it to some cloud service. We’ve opted to upload it to Adafruit IO, an online service for storing data and making dashboards. You’ll need a free account, which you can sign up for on the Adafruit IO website – you’ll need to know your Adafruit username and Adafruit IO key in order to run the code below. If you’d rather use a different service, you’ll need to adjust the code to push your data there.

We’ll use Python 3 for our code, and we need two modules – one to read the data from the SDS011 and one to push it to Adafruit IO. You can install this by entering the following commands in a terminal:

pip3 install pyserial adafruit-io

You’ll now need to open a text editor and enter the following code:

This does a few things. First, it reads ten bytes of data over the serial port – exactly ten because that’s the format that the SDS011 sends data in – and sticks these data points together to form a list of bytes that we call data.

We’re interested in bytes 2 and 3 for PM2.5 and 4 and 5 for PM10. We convert these from bytes to integer numbers with the slightly confusing line:

pmtwofive = int.from_bytes(b’’.join(data[2:4]), byteorder=’little’) / 10

from_byte command takes a string of bytes and converts them into an integer. However, we don’t have a string of bytes, we have a list of two bytes, so we first need to convert this into a string. The b’’ creates an empty string of bytes. We then use the join method of this which takes a list and joins it together using this empty string as a separator. As the empty string contains nothing, this returns a byte string that just contains our two numbers. The byte_order flag is used to denote which way around the command should read the string. We divide the result by ten, because the SDS011 returns data in units of tens of grams per metre cubed and we want the result in that format aio.send is used to push data to Adafruit IO. The first command is the feed value you want the data to go to. We used kingswoodtwofive and kingswoodten, as the sensor is based in Kingswood. You might want to choose a more geographically relevant name. You can now run your sensor with:

python3 airquality.py

…assuming you called the Python file airquality.py
and it’s saved in the same directory the terminal’s in.

At this point, everything should work and you can set about running your sensor, but as one final point, let’s set it up to start automatically when you turn the Raspberry Pi on. Enter the command:

crontab -e

…and add this line to the file:

@reboot python3 /home/pi/airquality.py

With the code and electronic setup working, your sensor will need somewhere to live. If you want it outside, it’ll need a waterproof case (but include some way for air to get in). We used a Tupperware box with a hole cut in the bottom mounted on the wall, with a USB cable carrying power out via a window. How you do it, though, is up to you.

Now let’s democratise air quality data so we can make better decisions about the places we live.

Picking a sensor

There are a variety of particulate sensors on the market. We picked the SDS011 for a couple of reasons. Firstly, it’s cheap enough for many makers to be able to buy and build with. Secondly, it’s been reasonably well studied for accuracy. Both the hackAIR and InfluencAir projects have compared the readings from these sensors with more expensive, better-tested sensors, and the results have come back favourably. You can see more details at hsmag.cc/DiYPfg and hsmag.cc/Luhisr.

The one caveat is that the results are unreliable when the humidity is at the extremes (either very high or very low). The SDS011 is only rated to work up to 70% humidity. If you’re collecting data for a study, then you should discard any readings when the humidity is above this. HackAIR has a formula for attempting to correct for this, but it’s not reliable enough to neutralise the effect completely. See their website for more details: hsmag.cc/DhKaWZ.

Safe levels

Once you’re monitoring your PM2.5 data, what should you look out for? The World Health Organisation air quality guideline stipulates that PM2.5 not exceed 10 µg/m3 annual mean, or 25 µg/m3 24-hour mean; and that PM10 not exceed 20 µg/m3 annual mean, or 50 µg/m3 24-hour mean. However, even these might not be safe. In 2013, a large survey published in The Lancet “found a 7% increase in mortality with each 5 micrograms per cubic metre increase in particulate matter with a diameter of 2.5 micrometres (PM2.5).”

Where to locate your sensor

Standard advice for locating your sensor is that it should be outside and four metres above ground level. That’s good advice for general environmental monitoring; however, we’re not necessarily interested in general environmental monitoring – we’re interested in knowing what we’re breathing in.

Locating your monitor near your workbench will give you an idea of what you’re actually inhaling – useless for any environmental study, but useful if you spend a lot of time in there. We found, for example, that the glue gun produced huge amounts of PM2.5, and we’ll be far more careful with ventilation when using this tool in the future.

Adafruit IO

You can use any data platform you like. We chose Adafruit IO because it’s easy to use, lets you share visualisations (in the form of dashboards) with others, and connects with IFTTT to perform actions based on values (ours tweets when the air pollution is above legal limits).

One thing to be aware of is that Adafruit IO only holds data for 30 days (on the free tier at least). If you want historical data, you’ll need to sign up for the Plus option (which stores data for 60 days), or use an alternative storage method. You can use multiple data stores if you like.

Checking accuracy

Now you’ve got your monitoring station up and running, how do you know that it’s running properly? Perhaps there’s an issue with the sensor, or perhaps there’s a problem with the code. The easiest method of calibration is to test it against an accurate sensor, and most cities here in the UK have monitoring stations as part of Defra’s Automatic Urban and Rural Monitoring Network. You can find your local station here. Many other countries have equivalent public networks. Unless there is no other option, we would caution against using crowdsourced data for calibration, as these sensors aren’t themselves calibrated.

With a USB battery pack, you can head to your local monitoring point and see if your monitor is getting similar results to the monitoring network.

HackSpace magazine #21 is out now

You can read the rest of this feature in HackSpace magazine issue 21, out today in Tesco, WHSmith, and all good independent UK newsagents.

Or you can buy HackSpace mag directly from us — worldwide delivery is available. And if you’d like to own a handy digital version of the magazine, you can also download a free PDF.

The post Monitor air quality with a Raspberry Pi appeared first on Raspberry Pi.

Hack your old Raspberry Pi case for the Raspberry Pi 4

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/hack-your-old-raspberry-pi-case-for-the-raspberry-pi-4/

Hack your existing Raspberry Pi case to fit the layout of your new Raspberry Pi 4, with this handy “How to hack your existing Raspberry Pi case to fit the layout of your new Raspberry Pi 4” video!

Hack your old Raspberry Pi case to fit your Raspberry Pi 4

Hack your existing official Raspberry Pi case to fit the new Raspberry Pi 4, or treat yourself to the new official Raspberry Pi 4 case. The decision is yours!

How to hack your official Raspberry Pi case

  1. Take your old Raspberry Pi out of its case.
  2. Spend a little time reminiscing about all the fun times you had together.
  3. Reassure your old Raspberry Pi that this isn’t the end, and that it’ll always have a special place in your heart.
  4. Remember that one particular time – you know the one; wipe a loving tear from your eye.
  5. Your old Raspberry Pi loves you. It’s always been there for you. Why are you doing this?
  6. Look at the case. Look at it. Look how well it fits your old Raspberry Pi. Those fine, smooth edges; that perfect white and red combination. The three of you – this case, your old Raspberry Pi, and you – you make such a perfect team. You’re brilliant.
  7. Look at your new Raspberry Pi 4. Yes, it’s new, and faster, and stronger, but this isn’t about all that. This is about all you’ve gone through with your old Raspberry Pi. You’re just not ready to say goodbye. Not yet.
  8. Put your buddy, the old Raspberry Pi, back in its case and set it aside. There are still projects you can work on together; this is not the end. No, not at all.
  9. In fact, why do you keep calling it your old Raspberry Pi? There’s nothing old about it. It still works; it still does the job. Sure, your Raspberry Pi 4 can do things that this one can’t, and you’re looking forward to trying them out, but that doesn’t make this one redundant. Heck, if we went around replacing older models with newer ones all the time, Grandma would be 24 years old and you’d not get any of her amazing Sunday dinners, and you do love her honey-glazed parsnips.
  10. Turn to your new Raspberry Pi 4 and introduce yourself. It’s not its fault that you’re having a temporary crisis. It hasn’t done anything wrong. So take some time to really get to know your new friend.
  11. New friendships take time, and fresh beginnings, dare we say it…deserve new cases.
  12. Locate your nearest Raspberry Pi Approved Reseller and purchase the new Raspberry Pi 4 case, designed especially to make your new Raspberry Pi comfortable and secure.
  13. Reflect that this small purchase of a new case will support the charitable work of the Raspberry Pi Foundation. Enjoy a little warm glow inside. You did good today.
  14. Turn to your old keyboard

The post Hack your old Raspberry Pi case for the Raspberry Pi 4 appeared first on Raspberry Pi.

How to build databases using Python and text files | Hello World #9

Post Syndicated from Mac Bowley original https://www.raspberrypi.org/blog/how-to-build-databases-using-python-and-text-files-hello-world-9/

In Hello World issue 9, Raspberry Pi’s own Mac Bowley shares a lesson that introduces students to databases using Python and text files.

In this lesson, students create a library app for their books. This will store information about their book collection and allow them to display, manipulate, and search their collection. You will show students how to use text files in their programs that act as a database.

The project will give your students practical examples of database terminology and hands-on experience working with persistent data. It gives opportunities for students to define and gain concrete experience with key database concepts using a language they are familiar with. The script that accompanies this activity can be adapted to suit your students’ experience and competency.

This ready-to-go software project can be used alongside approaches such as PRIMM or pair programming, or as a worked example to engage your students in programming with persistent data.

What makes a database?

Start by asking the students why we need databases and what they are: do they ever feel unorganised? Life can get complicated, and there is so much to keep track of, the raw data required can be overwhelming. How can we use computing to solve this problem? If only there was a way of organising and accessing data that would let us get it out of our head. Databases are a way of organising the data we care about, so that we can easily access it and use it to make our lives easier.

Then explain that in this lesson the students will create a database, using Python and a text file. The example I show students is a personal library app that keeps track of which books I own and where I keep them. I have also run this lesson and allowed the students pick their own items to keep track of — it just involves a little more planning time at the end. Split the class up into pairs; have each of them discuss and select five pieces of data about a book (or their own item) they would like to track in a database. They should also consider which type of data each of them is. Give them five minutes to discuss and select some data to track.

Databases are organised collections of data, and this allows them to be displayed, maintained, and searched easily. Our database will have one table — effectively just like a spreadsheet table. The headings on each of the columns are the fields: the individual pieces of data we want to store about the books in our collection. The information about a single book are called its attributes and are stored together in one record, which would be a single row in our database table. To make it easier to search and sort our database, we should also select a primary key: one field that will be unique for each book. Sometimes one of the fields we are already storing works for this purpose; if not, then the database will create an ID number that it uses to uniquely identify each record.

Create a library application

Pull the class back together and ask a few groups about the data they selected to track. Make sure they have chosen appropriate data types. Ask some if they can find any of the fields that would be a primary key; the answer will most likely be no. The ISBN could work, but for our simple application, having to type in a 10- or 13-digit number just to use for an ID would be overkill. In our database, we are going to generate our own IDs.

The requirements for our database are that it can do the following things: save data to a file, read data from that file, create new books, display our full database, allow the user to enter a search term, and display a list of relevant results based on that term. We can decompose the problem into the following steps:

  • Set up our structures
  • Create a record
  • Save the data to the database file
  • Read from the database file
  • Display the database to the user
  • Allow the user to search the database
  • Display the results

Have the class log in and power up Python. If they are doing this locally, have them create a new folder to hold this project. We will be interacting with external files and so having them in the same folder avoids confusion with file locations and paths. They should then load up a new Python file. To start, download the starter file from the link provided. Each student should make a copy of this file. At first, I have them examine the code, and then get them to run it. Using concepts from PRIMM, I get them to print certain messages when a menu option is selected. This can be a great exemplar for making a menu in any application they are developing. This will be the skeleton of our database app: giving them a starter file can help ease some cognitive load from students.

Have them examine the variables and make guesses about what they are used for.

  • current_ID – a variable to count up as we create records, this will be our primary key
  • new_additions – a list to hold any new records we make while our code is running, before we save them to the file
  • filename – the name of the database file we will be using
  • fields – a list of our fields, so that our dictionaries can be aligned with our text file
  • data – a list that will hold all of the data from the database, so that we can search and display it without having to read the file every time

Create the first record

We are going to use dictionaries to store our records. They reference their elements using keys instead of indices, which fit our database fields nicely. We are going to generate our own IDs. Each of these must be unique, so a variable is needed that we can add to as we make our records. This is a user-focused application, so let’s make it so our user can input the data for the first book. The strings, in quotes, on the left of the colon, are the keys (the names of our fields) and the data on the right is the stored value, in our case whatever the user inputs in response to our appropriate prompts. We finish this part of by adding the record to the file, incrementing the current ID, and then displaying a useful feedback message to the user to say their record has been created successfully. Your students should now save their code and run it to make sure there aren’t any syntax errors.

You could make use of pair programming, with carefully selected pairs taking it in turns in the driver and navigator roles. You could also offer differing levels of scaffolding: providing some of the code and asking them to modify it based on given requirements.

How to use the code in your class

To complete the project, your students can add functionality to save their data to a CSV file, read from a database file, and allow users to search the database. The code for the whole project is available at helloworld.cc/database.

An example of the code

You may want to give your students the entire piece of code. They can investigate and modify it to their own purpose. You can also lead them through it, having them follow you as you demonstrate how an expert constructs a piece of software. I have done both to great effect. Let me know how your classes get on! Get in touch at [email protected]

Hello World issue 9

The brand-new issue of Hello World is out today, and available right now as a free PDF download from the Hello World website.



UK-based educators can also sign up to receive Hello World as printed magazine FOR FREE, direct to their door. And those outside the UK, educator or not, can subscribe to receive new digital issues of Hello World in their inbox on the day of release.

The post How to build databases using Python and text files | Hello World #9 appeared first on Raspberry Pi.

The NEW Official Raspberry Pi Beginner’s Guide: updated for Raspberry Pi 4

Post Syndicated from Phil King original https://www.raspberrypi.org/blog/the-new-official-raspberry-pi-beginners-guide-updated-for-raspberry-pi-4/

To coincide with the launch of Raspberry Pi 4, Raspberry Pi Press has created a new edition of The Official Raspberry Pi Beginner’s Guide book — as if this week wasn’t exciting enough! Weighing in at 252 pages, the book is even bigger than before, and it’s fully updated for Raspberry Pi 4 and the latest version of the Raspbian operating system, Buster.A picture of the front cover of the Raspberry Pi Beginner's Guide version two

The Official Raspberry Pi Beginner’s Guide

We’ve roped in Gareth Halfacree, full-time technology journalist and technical author, and the wonderful Sam Alder, illustrator of our incredible cartoons and animations, to put together the only guide you’ll ever need to get started with Raspberry Pi.



From setting up your Raspberry Pi on day one to taking your first steps into writing coding, digital making, and computing, The Official Raspberry Beginner’s Guide – 2nd Edition is great for users from age 7 to 107! It’s available now online from the Raspberry Pi Press store, with free international delivery, or from the real-life Raspberry Pi Store in Cambridge, UK.

As always, we have also released the guide as a free PDF, and you’ll soon be seeing physical copies on the shelves of Waterstones, Foyles, and other good bookshops.

The post The NEW Official Raspberry Pi Beginner’s Guide: updated for Raspberry Pi 4 appeared first on Raspberry Pi.

Make a retro console with RetroPie and a Raspberry Pi — part 2

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/retro-console-with-retropie-raspberry-pi-2/

Here’s part two of Lucy Hattersley’s wonderful retro games console tutorial. Part 1 of the tutorial lives here, for those of you who missed it.

Choose the network locale

RetroPie boots into EmulationStation, which is your starter interface. It’s currently displaying just the one option, RetroPie, which is used to set up the emulation options. As you add games to RetroPie, other systems will appear in EmulationStation.

With RetroPie selected, press the A button on the gamepad to open the configuration window. Use the D-pad to move down the options and select WiFi. You will see a warning message: ‘You don’t currently have your WiFi country set…’. Press the D-pad left to choose Yes, and press A. The interface will open raspi-config. At this point, it’s handy to switch to the keyboard and use that instead.

Choose 4 Localisation Options, and press the right arrow key on the keyboard to highlight Select, then press Enter.

Now choose 4 Change Wi-fi Country and pick your country from the list. We used GB Britain (UK). Highlight OK and press Enter to select it.

Now move right twice to choose Finish and press Enter. This will reboot the system.

Connect to wireless LAN

If you have a Raspberry Pi with an Ethernet connection, you can use an Ethernet cable to connect directly to your router/modem or network.

More likely, you’ll connect the Raspberry Pi to a wireless LAN network so you can access it when it’s beneath your television.

Head back into RetroPie from EmulationStation and down to the WiFi setting; choose Connect to WiFi network.

The window will display a list of nearby wireless LAN networks. Choose your network and use the keyboard to enter the wireless LAN password. Press Enter when you’re done. Choose the Exit option to return to the RetroPie interface.

Configuration tools

Now choose RetroPie Setup and then Configuration Tools. Here, in the Choose an option window, you’ll find a range of useful tools. As we’re using a USB gamepad, we don’t need the Bluetooth settings, but it’s worth noting they’re here.

We want to turn on Samba so we can share files from our computer directly to RetroPie. Choose Samba and Install RetroPie Samba shares, then select OK.

Now choose Cancel to back up to the Choose an option window, and then Back to return to the RetroPie-Setup script.

Run the setup script

Choose Update RetroPie-Setup script and press Enter. After the script has updated, press Enter again and you’ll be back at the Notice: window. Press Enter and choose Basic install; press Enter, choose Yes, and press Enter again to begin the setup and run the configuration script.

When the script has finished, choose Perform a reboot and Yes.

Turn on Samba in Windows

We’re going to use Samba to copy a ROM file (a video game image) from our computer to RetroPie.

Samba used to be installed by default in Windows, but it has recently become an optional installation. In Windows 10, click on the Search bar and type ‘Control Panel’. Click on Control Panel in the search results.

Now click Programs and Turn Windows features on or off. Scroll down to find SMB 1.0/CIFS File Sharing Support and click the + expand icon to reveal its options. Place a check in the box marked SMB 1.0/CIFS Client. Click OK. This will enable Samba client support on your Windows 10 PC so it can access the Raspberry Pi.

We’ve got more information on how Samba works on The MagPi’s website.

Get the game

On your Windows PC or Mac, open a web browser, and visit the Blade Buster website. This is a homebrew video game designed by High Level Challenge for old NES systems. The developer’s website is in Japanese — just click BLADE BUSTER Download to save the ROM file to your Downloads folder.

Open a File Explorer (or Finder) window and locate the BB_20120301.zip file in your Downloads folder. Don’t unzip the file.

Click on Network and you’ll see a RETROPIE share. Open it and locate the roms folder. Double-click roms and you’ll see folders for many classic systems. Drag and drop the BB_20120301.zip file and place it inside the nes folder.

Play the game

Press the Start button on your gamepad to bring up the Main Menu. Choose Quit and Restart EmulationStation. You’ll now see a Nintendo Entertainment System option with 1 Games Available below it. Click it and you’ll see BB_20120301 — this is Blade Buster. Press A to start the game. Have fun shooting aliens. Press Start and Analog (or whatever you’ve set as your hotkey) together when you’re finished; this will take you back to the game selection in EmulationStation.

If you’ve been setting up RetroPie on your monitor, now is the time to move it across to your main television. The RetroPie console will boot automatically and connect to the network, and then you can move ROM files over to it from your PC or Mac. At this point, you may notice black borders around the screen; if so, see the Fix the borders tip.

Enjoy your gaming system!

More top tips from Lucy

Change the resolution

Some games were designed for a much lower resolution, and scaling them up can look blocky on modern televisions. If you’d prefer to alter the resolution, choose ‘RetroPie setup’. Open raspi-config, Advanced Options, and Resolution. Here you’ll find a range of other resolution options to choose from.

Fix the borders

These are caused by overscan. Choose RetroPie from EmulationStation and raspi-config. Now select Advanced Options > Overscan and select No on the ‘Would you like to enable compensation for displays with overscan?’ window. Choose OK and then Finish. Choose Yes on the Reboot Now window. When the system has rebooted, you will see the borders are gone.

The MagPi magazine issue 81

This article is from the latest issue of The MagPi magazine, which is out today and can be purchased online, at the Raspberry Pi Store, or from many newsagents and bookshops, such as WHSmith and Barnes & Noble.

The MagPi magazine issue 81

You can also download issue 81 for free from The MagPi website, where you’ll also find information on subscription options, and the complete MagPi catalogue, including Essentials guides and books, all available to download for free.

the MagPi subscription

The post Make a retro console with RetroPie and a Raspberry Pi — part 2 appeared first on Raspberry Pi.

Make a retro console with RetroPie and a Raspberry Pi — part 1

Post Syndicated from Lucy Hattersley original https://www.raspberrypi.org/blog/retro-console-with-retropie-raspberry-pi-1/

Discover classic gaming on the Raspberry Pi and play homebrew ROMs, with this two-part tutorial from The MagPi Editor Lucy Hattersley.

Raspberry Pi retro games console

Turning a Raspberry Pi device into a retro games console is a fun project, and it’s one of the first things many a new Pi owner turns their hand to.

The appeal is obvious. Retro games are fun, and from a programming perspective, they’re a lot easier to understand than modern 3D powerhouses. The Raspberry Pi board’s small form factor, low power usage, HDMI connection, and wireless networking make it a perfect micro-console that can sit under your television.

RetroPie

There are a bunch of different emulators around for Raspberry Pi. In this tutorial, we’re going to look at RetroPie.

RetroPie combines Raspbian, EmulationStation, and RetroArch into one handy image. With RetroPie you can emulate arcade games, as well as titles originally released on a host of 8-bit, 16-bit, and even 32- and 64-bit systems. You can hook up a joypad; we’re going to use the Wireless USB Game Controller, but most other USB game controllers will work.

You can also use Bluetooth to connect a controller from most video games consoles. RetroPie has an interface that will be very familiar to anyone who has used a modern games console, and because it is open-source, it is constantly being improved.

You can look online for classic games, but we prefer homebrew and modern releases coded for classic systems. In this tutorial, we will walk you through the process of setting up RetroPie, configuring a gamepad, and running a homebrew game called Blade Buster.

Get your microSD card ready

RetroPie is built on top of Raspbian (the operating system for Raspberry Pi). While it is possible to install RetroPie from the desktop interface, it’s far easier to format a microSD card† and copy a new RetroPie image to the blank card. This ensures all the settings are correct and makes setup much easier. Our favourite method of wiping microSD cards on a PC or Apple Mac is to use SD Memory Card Formatter.

Attach the microSD card to your Windows or Mac computer and open SD Card Formatter. Ensure the card is highlighted in the Select card section, then click Format.

Download RetroPie

Download the RetroPie image. It’ll be downloaded as a gzip file; the best way to expand this on Windows is using 7-Zip (7-zip.org).

With 7-Zip installed, right-click the retropie-4.4-rpi2_rpi3.img.gz file and choose 7-Zip > Extract here. Extract GZ files on a Mac or Linux PC using gunzip -k <filename.gz> (the -k option keeps the original GZ file).

gunzip -k retropie-4.4-rpi2_rpi3.img.gz

Flash the image

We’re going to use Etcher to copy the retropie-4.4-rpi2_rpi3.img file to our freshly formatted microSD card. Download Etcher. Open Etcher and click Select Image, then choose the retropie-4.4-rpi2_rpi3.img image file and click Open.

Etcher should have already located the microSD card; remove and replace it if you see a Select Drive button. Click Flash! to copy the RetroPie image to the microSD card.

See our guide for more information on how to use Etcher to flash SD cards.

Set up the Raspberry Pi

Insert the flashed microSD card to your Raspberry Pi. Now attach the Raspberry Pi to a TV or monitor using the HDMI cable. Connect the USB dongle from the Wireless USB Game Controller to the Raspberry Pi. Also attach a keyboard (you’ll need this for the setup process).

Insert the batteries in the Wireless USB Game Controller and set the power switch (on the back of the device) to On. Once everything is connected, attach a power supply to the Raspberry Pi.

See our quickstart guide for more detailed information on setting up a Raspberry Pi.

Configure the gamepad

When RetroPie starts, you should see Welcome screen displaying the message ‘1 gamepad detected’. Press and hold one of the buttons on the pad, and you will see the Configuring screen with a list of gamepad buttons and directions.

Tap the D-pad (the four-way directional control pad on the far left) up on the controller and ‘HAT 0 UP’ will appear. Now tap the D-pad down.
Map the A, B, X, Y buttons to:

A: red circle
B: blue cross
X: green triangle
Y: purple square

The Left and Right Shoulder buttons refer to the topmost buttons on the rear of the controller, while the Triggers are the larger lower buttons.

Push the left and right analogue sticks in for the Left and Right Thumbs. Click OK when you’re done.

Top tips from Lucy

Install Raspbian desktop

RetroPie is built on top of the Raspbian operating system. You might be tempted to install RetroPie on top of the Raspbian with Desktop interface, but it’s actually much easier to do it the other way around. Open RetroPie from EmulationStation and choose RetroPie setup. Select Configuration tools and Raspbian tools. Then choose Install Pixel desktop environment and Yes.

When it’s finished, choose Quit and Restart EmulationStation. When restarted, EmulationStation will display a Ports option. Select it and choose Desktop to boot into the Raspbian desktop interface.

Username and password

If RetroPie asks you for the username and password during boot, the defaults are pi and raspberry.

The MagPi magazine issue 81

The rest of this article can be found in the latest issue of The MagPi magazine, which is out now and can be purchased online, at the Raspberry Pi Store, or from many independent bookshops, such as WHSmith and Barnes & Noble. We’ll also post the second half on the blog tomorrow!

The MagPi magazine issue 81

You can also download issue 81 for free from The MagPi website, where you’ll find information on subscription options, and the complete MagPi catalogue, including Essentials guides and books, all available to download for free.

the MagPi subscription

The post Make a retro console with RetroPie and a Raspberry Pi — part 1 appeared first on Raspberry Pi.