Tag Archives: The MagPi

(Raspberry) Pi Commander | The MagPi 95

via Raspberry Pi

Adrien Castel’s idea of converting an old electronic toy into a retro games machine was no flight of fancy, as David Crookes discovers

The 1980s was a golden era for imaginative electronic toys. Children would pester their parents for a Tomytronic 3D or a Nintendo Game & Watch. And they would enviously eye anyone who had a Tomy Turnin’ Turbo Dashboard with its promise of replicating the thrill of driving (albeit without the traffic jams).

All of the buttons, other than the joystick, are original to the toy – as are the seven red LED lights

Two years ago, maker Matt Brailsford turned that amazing toy into a fully working Out Run arcade machine and Adrien Castel was smitten. “I loved the fact that he’d upcycled an old toy and created something that could be enjoyed as a grown-up,” he says. “But I wanted to push the simulation a bit further and I thought a flying sim could do the trick.”

“I didn’t want to modify the look of the toy”

Ideas began flying around Adrien’s mind. “I knew what I wanted to achieve so I made an overall plan in my head,” he recalls. First he found the perfect toy: a battery-powered Sky Fighter F-16 tabletop game made by Dival. He then decided to base his build around a Raspberry Pi 3A+. “It’s the perfect hardware for projects like this because of its flexibility,” Adrien says.

Taking off

The toy needed some work. Its original bright red joystick was missing and Adrien knew he’d have to replace the original screen with a TFT LCD. To do this, he 3D-printed a frame to fit the TFT display and he created a smaller base for the replacement joystick. Adrien also changed the microswitches for greater sensitivity but he didn’t go overboard with the changes.

The games can make use of the full screen. Adrien would have liked a larger screen, but the original ratio oddly lay between 4:3 and 16:9, making a bigger display harder to find

“I knew I would have to adapt some parts for the joystick and for the screen, but I didn’t want to modify the look of the toy,” Adrien explains. “To be honest, modifying the toy would have involved some sanding and painting and I was worried that it would ruin the overall effect of the project if it was badly executed.”

A Raspberry Pi 3A+ sits at the heart of the Pi Commander, alongside a mini audio amplifier, and it’s wired up to components within the toy

As such, a challenge was set. “I had to keep most of the original parts such as throttle levers and LEDs and adapt them to the new build,” he says. “This meant getting them to work together with the system and it also meant using the original PCB, getting rid of the components and re-routing the electronics to plug on the GPIOs.”

There were some enhancements. Adrien soldered a PAM8403 3W class-D audio amplifier to Raspberry Pi and this allowed a basic speaker to replace the original for better sound. But there were some compromises too.

The original PCB was used and the electronics were re-routed. All the components need to work between 3.3 to 5V with the lowest possible amperage while fitting into a tight space

“At first I thought the screen could be bigger than the one I used, but the round shape of the cockpit didn’t give much space to fit a screen larger than four inches.” He also believes the project could be improved with a better joystick: “The one I’ve used is a simple two-button arcade stick with a jet fighter look.”

Flying high

By using the retro gaming OS Recalbox (based on EmulationStation and RetroArch), however, he’s been able to perfect the overall feel. “Recalbox allowed me to create a custom front end that matches the look of a jet fighter,” he explains. It also means the Pi Commander plays shoot-’em-up games alongside open-source simulators like FlightGear (flightgear.org). “It’s a lot of fun.”

Read The MagPi for free!

Find more fantastic projects, tutorials, and reviews in The MagPi #93, out now! You can get The MagPi #95 online at our store, or in print from all good newsagents and supermarkets. You can also access The MagPi magazine via our Android and iOS apps.

Don’t forget our super subscription offers, which include a free gift of a Raspberry Pi Zero W when you subscribe for twelve months.

And, as with all our Raspberry Pi Press publications, you can download the free PDF from our website.

The post (Raspberry) Pi Commander | The MagPi 95 appeared first on Raspberry Pi.

How to work from home with Raspberry Pi | The Magpi 93

via Raspberry Pi

If you find yourself working or learning, or simply socialising from home, Raspberry Pi can help with everything from collaborative productivity to video conferencing. Read more in issue #92 of The MagPi, out now.

01 Install the camera

If you’re using a USB webcam, you can simply insert it into a USB port on Raspberry Pi. If you’re using a Raspberry Pi Camera Module, you’ll need to unpack it, then find the ‘CAMERA’ port on the top of Raspberry Pi – it’s just between the second micro-HDMI port and the 3.5mm AV port. Pinch the shorter sides of the port’s tab with your nails and pull it gently upwards. With Raspberry Pi positioned so the HDMI ports are at the bottom, insert one end of the camera’s ribbon cable into the port so the shiny metal contacts are facing the HDMI port. Hold the cable in place, and gently push the tab back home again.

If the Camera Module doesn’t have the ribbon cable connected, repeat the process for the connector on its underside, making sure the contacts are facing downwards towards the module. Finally, remove the blue plastic film from the camera lens.

02 Enable Camera Module access

Before you can use your Raspberry Pi Camera Module, you need to enable it in Raspbian. If you’re using a USB webcam, you can skip this step. Otherwise, click on the raspberry menu icon in Raspbian, choose Preferences, then click on Raspberry Pi Configuration.

When the tool loads, click on the Interfaces tab, then click on the ‘Enabled’ radio button next to Camera. Click OK, and let Raspberry Pi reboot to load your new settings. If you forget this step, Raspberry Pi won’t be able to communicate with the Camera Module.

03 Set up your microphone

If you’re using a USB webcam, it may come with a microphone built-in; otherwise, you’ll need to connect a USB headset, a USB microphone and separate speakers, or a USB sound card with analogue microphone and speakers to Raspberry Pi. Plug the webcam into one of Raspberry Pi’s USB 2.0 ports, furthest away from the Ethernet connector and marked with black plastic inners.

Right-click on the speaker icon at the top-right of the Raspbian desktop and choose Audio Inputs. Find your microphone or headset in the list, then click it to set it as the default input. If you’re using your TV or monitor’s speakers, you’re done; if you’re using a headset or separate speakers, right-click on the speaker icon and choose your device from the Audio Outputs menu as well.

04 Set access permissions

Click on the Internet icon next to the raspberry menu to load the Chromium web browser. Click in the address box and type hangouts.google.com. When the page loads, click ‘Sign In’ and enter your Google account details; if you don’t already have a Google account, you can sign up for one free of charge.

When you’ve signed in, click Video Call. You’ll be prompted to allow Google Hangouts to access both your microphone and your camera. Click Allow on the prompt that appears. If you Deny access, nobody in the video chat will be able to see or hear you!

05 Invite friends or join a chat

You can invite friends to your video chat by writing their email address in the Invite People box, or copying the link and sending it via another messaging service. They don’t need their own Raspberry Pi to participate – you can use Google Hangouts from a laptop, desktop, smartphone, or tablet. If someone has sent you a link to their video chat, open the message on Raspberry Pi and simply click the link to join automatically.

You can click the microphone or video icons at the bottom of the window to temporarily disable the microphone or camera; click the red handset icon to leave the call. You can click the three dots at the top-right to access more features, including switching the chat to full-screen view and sharing your screen – which will allow guests to see what you’re doing on Raspberry Pi, including any applications or documents you have open.

06 Adjust microphone volume

If your microphone is too quiet, you’ll need to adjust the volume. Click the Terminal icon at the upper-left of the screen, then type alsamixer followed by the ENTER key. This loads an audio mixing tool; when it opens, press F4 to switch to the Capture tab and use the up-arrow and down-arrow keys on the keyboard to increase or decrease the volume. Try small adjustments at first; setting the capture volume too high can cause the audio to ‘clip’, making you harder to hear. When finished, press CTRL+C to exit AlsaMixer, then click the X at the top-right of the Terminal to close it.

Adjust your audio volume settings with the AlsaMixer tool

Work online with your team

Just because you’re not shoulder-to-shoulder with colleagues doesn’t mean you can’t collaborate, thanks to these online tools.

Google Docs

Google Docs is a suite of online productivity tools linked to the Google Drive cloud storage platform, all accessible directly from your browser. Open the browser and go to drive.google.com, then sign in with your Google account – or sign up for a new account if you don’t already have one – for 15GB of free storage plus access to the word processor Google Docs, spreadsheet Google Sheets, presentation tool Google Slides, and more. Connect with colleagues and friends to share files or entire folders, and collaborate within documents with simultaneous multi-user editing, comments, and change suggestions.

Slack

Designed for business, Slack is a text-based instant messaging tool with support for file transfer, rich text, images, video, and more. Slack allows for easy collaboration in Teams, which are then split into multiple channels or rooms – some for casual conversation, others for more focused discussion. If your colleagues or friends already have a Slack team set up, ask them to send you an invite; if not, you can head to app.slack.com and set one up yourself for free.

Discord

Built more for casual use, Discord offers live chat functionality. While the dedicated Discord app includes voice chat support, this is not yet supported on Raspberry Pi – but you can still use text chat by opening the browser, going to discord.com, and choosing the ‘Open Discord in your browser’ option. Choose a username, read and agree to the terms of service, then enter an email address and password to set up your own free Discord server. Alternatively, if you know someone on Discord already, ask them to send you an invitation to access their server.

Firefox Send

If you need to send a document, image, or any other type of file to someone who isn’t on Google Drive, you can use Firefox Send – even if you’re not using the Firefox browser. All files transferred via Firefox Send are encrypted, and can be protected with an optional password, and are automatically deleted after a set number of downloads or length of time. Simply open the browser and go to send.firefox.com; you can send files up to 1GB without an account, or sign up for a free Firefox account to increase the limit to 2.5GB.

GitHub

For programmers, GitHub is a lifesaver. Based around the Git version control system, GitHub lets teams work on a project regardless of distance using repositories of source code and supporting files. Each programmer can have a local copy of the program files, work on them independently, then submit the changes for inclusion in the master copy – complete with the ability to handle conflicting changes. Better still, GitHub offers additional collaboration tools including issue tracking. Open the browser and go to github.com to sign up, or sign in if you have an existing account, and follow the getting started guide on the site.

Read The MagPi for free!

Find more fantastic projects, tutorials, and reviews in The MagPi #93, out now! You can get The MagPi #92 online at our store, or in print from all good newsagents and supermarkets. You can also access The MagPi magazine via our Android and iOS apps.

Don’t forget our super subscription offers, which include a free gift of a Raspberry Pi Zero W when you subscribe for twelve months.

And, as with all our Raspberry Pi Press publications, you can download the free PDF from our website.

The post How to work from home with Raspberry Pi | The Magpi 93 appeared first on Raspberry Pi.

Special offer for magazine readers

via Raspberry Pi

You don’t need me to tell you about the unprecedented situation that the world is facing at the moment. We’re all in the same boat, so I won’t say anything about it other than I hope you stay safe and take care of yourself and your loved ones.

The other thing I will say is that every year, Raspberry Pi Press produces thousands of pages of exciting, entertaining, and often educational content for lovers of computing, technology, games, and photography.

In times of difficulty, it’s not uncommon for people to find solace in their hobbies. The problem you’ll find yourself with is that it’s almost impossible to buy a magazine at the moment, at least in the UK: most of the shops that sell them are closed (and even most of their online stores are too).

We’re a proactive bunch, so we’ve done something about that:

From today, you can subscribe to The MagPi, HackSpace magazine, Custom PC, or Digital SLR Photography at a cost of three issues for £10 in the UK – and we’re giving you a little extra too.

We like to think we produce some of the best-quality magazines on the market today (and you only have to ask our mums if you want a second opinion). In fact, we’d go as far as to say our magazines are exactly the right mix of words and pictures for making the most of all the extra home-time you and your loved ones are having.

Take your pick for three issues at £10 and get a free book worth £10!

If you take us up on this offer, we’ll send the magazines direct to your door in the UK, with free postage. And we’re also adding a gift to thank you for signing up: on top of your magazines, you’ll get to choose a book that’s worth £10 in itself.

In taking up this offer, you’ll get some terrific reading material, and we’ll deliver it all straight to you — no waiting around. You’ll also be actively supporting our print magazines and the charitable work of the Raspberry Pi Foundation.

I hope that among our magazines, you’ll find something that’s of interest to you or, even better yet, something that sparks a new interest. Enjoy your reading!

The post Special offer for magazine readers appeared first on Raspberry Pi.

Instaclock | The Magpi 92

via Raspberry Pi

Designed to celebrate a new home, Instaclock uses two Raspberry Pi computers to great visual effect. Rosie Hattersley introduces maker Riccardo Cereser’s eyecatching build in issue #92 of The MagPi, out now.

There is nothing like a deadline to focus the mind! Copenhagen-based illustrator and UX designer Riccardo Cereser was about to move into a new apartment with his girlfriend, and was determined his new home would have a unique timepiece. Instaclock is the result.

Having studied at the Copenhagen Institute of Interactive Design, Italian-born Riccardo was keen that his new apartment would include an object that reflected his skills. He began sketching out ideas in Photoshop, starting with the idea of images representing numbers. “A hand showing fingers; a bicycle wheel resembling the number 0; candles on a cake; or the countdown numbers that appear in the beginning of a recording…” he suggests.

Having decided the idea could be used for an interactive clock, he quickly worked out how such an image-based concept might work displaying the hour, minutes, and seconds on displays in three wooden boxes.

Next, he set off around Copenhagen. “I started taking photos of anything that could resemble a number, aiming to create sets of ten pictures each based on a specific theme,” he recalls. “I then thought how awesome it would be to be able to switch the theme and create new sets on the go, potentially by using Instagram.”

This, Riccardo explains, is how the project became known as Instaclock. He was able to visualise his plan using Photoshop and made a prototype for his idea. It was clear that there was no need to display seconds, for example. Minute-by-minute updates would be fine.

Getting animated

Next up was figuring out how to call up and refresh the images displayed. Riccardo had some experience of using Raspberry Pi, and had even made a RetroPie games console. He also had a friend on the interactive design course who might just be able to help

Creative coder Andreas Refsgaard soon got involved, and was quickly able to come up with a Processing sketch for Instaclock.

Having spent dozens of hours looking into how an API might be used to pull in specific images for his clock, Riccardo was grateful that Andreas immediately grasped how it could be done. Riccardo then set parameters in cron for each Raspberry Pi used, so the Instaclock loaded images at startup and moved on to the next image set every ten seconds.

Because Riccardo wanted Instaclock to be as user-friendly as possible, they also added a rule that shuts a screen down if the button on top of it is pressed for ten seconds or more. The script was one he got from The MagPi.

Assembly time

One of the most fun aspects of this project was the opportunity to photograph, draw, or source online images that represent numerals. It was also the most time-consuming, of course. Images reside in Dropbox folders, so can be accessed from anywhere. Deciding on a suitable set of screens to display them, and boxes or frames for them, could also have dragged on but for an impromptu visit to Ikea. Riccardo fortuitously found that the Waveshare screens he selected would fit neatly into the store’s Dragan file organiser boxes. He was then able to laser-cut protective overlays secured with tiny magnets.

Read The MagPi for free!

Find more fantastic projects, tutorials, and reviews in The MagPi #92, out now! You can get The MagPi #92 online at our store, or in print from all good newsagents and supermarkets. You can also access The MagPi magazine via our Android and iOS apps.

Don’t forget our super subscription offers, which include a free gift of a Raspberry Pi Zero W when you subscribe for twelve months.

And, as with all our Raspberry Pi Press publications, you can download the free PDF from our website.

The post Instaclock | The Magpi 92 appeared first on Raspberry Pi.

El Carrillon | The MagPi 92

via Raspberry Pi

Most Raspberry Pi projects we feature debut privately and with little fanfare – at least until they’re shared by us.

The El Carrillon project, however, could hardly have made a more public entrance. In September 2019 it was a focal point of Argentina’s 49th annual Fiesta Nacional de la Flor (National Flower Festival), where its newly overhauled bell tower proudly rang out a brand-new, Raspberry Pi-enabled tune.

Many years ago, festival organisers created custom hardware with a PIC (programmable interface) microcontroller to control 18 tuned bells. Each bell is associated with a musical note, from A3 to D5 with all the semitones. Until its long overdue update, the tower’s 18 bells had rung the tune to Ayer, also known as Yesterday by The Beatles. They now have a brand-new repertoire of MIDI-based tunes, including the theme from Star Wars.

For Gerardo Richarte, the originator of the project, there was a little extra pressure: his dad is on the board of the NGO that organises Fiesta Nacional de la Flor, and challenged his son to come up with a way to update the bells so different songs could be played.

Ringing the changes

With the challenge accepted, Mariano Martinez Peck explains, “We chose Raspberry Pi because it was inexpensive, yet powerful enough to run Linux, Python, and VA Smalltalk. We could find ready-made HATs that actually matched the pinout of the existing flat cables without much hacking, and only a minimal amount of other hardware was needed. In addition, there was plenty of documentation, materials, tutorials, and GPIO libraries available.”

The bells had a pre-existing driver module

The project aim was to be able to run a mobile-friendly website within Raspberry Pi Zero that allowed control, configuration, and playback of MIDI songs on the bell tower. “In addition, we wanted to allow live playing from a MIDI keyboard,” says Mariano. The project developed as a live test and iteration update, but the final build only came together when Mariano and Gerardo’s moment in the spotlight arrived and El Carrillon rang out the first new tunes.

Coding a classic

The decades-old chimes were controlled by assembly code. This was superseded by Python when the team made the switch to Raspberry Pi Zero. Mariano explains, “Raspberry Pi allowed us to use Python to directly interface with both the old and new hardware and get the initial project working.”

However, the Python code was itself replaced by object-oriented VA Smalltalk code – an environment both Mariano and Gerardo are adept at using. Mariano says, “Smalltalk’s live programming environment works really well for fast, iterative development and makes software updates quick and easy without the need for recompilation that lower-level languages [such as assembly or C/C++] would need.”

El Carrillon’s bells can now play any MIDI file on Raspberry Pi, and the notes of the song will be mapped to the tuned bells. However, as the testing process revealed, some songs are more recognisable than others when reproduced on chimes.

A final feature enabled Gerardo to bag some brownie points with his father-in-law. He recently added a web interface for controlling, configuring, and playing songs, meaning the bells can now be controlled remotely and the song selected via a smartphone app.

The El Carrillon bell tower forms a striking backdrop to the flower festival and other cultural events

Read The MagPi for free!

Find more amazing projects and tutorials in The MagPi #92, out now! You can get The MagPi #92 online at our store, or in print from all good newsagents and supermarkets. You can also access The MagPi magazine via our Android and iOS apps.

Don’t forget our fantastic subscription offers, which include a free gift of a Raspberry Pi Zero W when you subscribe for twelve months.

And, as with all our Raspberry Pi Press publications, you can download the free PDF from our website.

The post El Carrillon | The MagPi 92 appeared first on Raspberry Pi.

The MagPi 91: #MonthOfMaking is back for 2020!

via Raspberry Pi

If you read The MagPi, it’s safe to say you like making in some way. The hobby has exploded in popularity over the last few years, thanks in no small part to a burgeoning online community and the introduction of low-cost computing with Raspberry Pi.

Last year we decided to celebrate making with a month-long online event called #MonthOfMaking. The idea was simply to get people to share what they’re making online, whatever it was. Whether you’re turning on your first LED with code or sending rockets to the moon, we want to create a space where you can share your proud achievements. So, let’s get making.

What is #MonthOfMaking?

#MonthOfMaking is simply an excuse to get people inspired to make something. And by make, we mean electronics, engineering, art, and craft projects. Get your creative powers buzzing and make something that you can show to the world.

There’s no skill-level threshold to participating either. If you’ve been wanting to start learning, this can be your jumping-on point. By sharing your builds with the community, you can learn and grow. Here are some simple rules to sum it all up:

  1. Find a new project, continue with one you’re working on, or finally crack on with something you’ve been putting off.
  2. Take pictures of your build progress and share it online with the hashtag #MonthOfMaking.
  3. If you can help someone with a problem, give them a hand.
  4. Have fun!

Getting ideas and inspiration

We’ve all been there. Sat down at a work bench or desk, staring at some components and thinking… what can I make with this? What would I like to make? Like any other creative pursuit, you’ll need some inspiration. If the projects in the magazine haven’t inspired you, then here are some website suggestions…

Instructables

Instructables is one of the oldest sites out there for finding amazing project guides and ideas, and we’ve been fans of it for years. The best part is you can search by specific project types as well, including Raspberry Pi if you’d like to keep it on‑brand. They’ve recently added more arts and crafts stuff if you fancy trying your hand at knitting.

Hackaday and Hackster

For more serious hacks for more advanced makers, Hackaday and Hackster have some great projects that really take a deep dive into a project. If you’re curious as to the limits of electronics and programming, these may be the place to look. Equally, if you want to do something huge with a lot of computer power, they should be your first stop.

Raspberry Pi projects

There are so many amazing things on the Raspberry Pi projects site that can help you with your first steps in just about any field of making. It’s also home to loads of great and simple home-grown projects that are perfect for young makers and older makers alike.

Planning your build

Step 01 Read and understand

Basing your build on a tutorial you’ve seen? Seen a few things you’d like to combine into something else? Always make sure to read the instructions you’ve found properly so that you know if it’s within your skill level.

Step 02 Order supplies
Write a list of what you need. Always double‑check you have the component you think you have. Sometimes you may need to buy from separate places, so just make sure the delivery times work for you.

Step 03 Follow along and be safe

Need adult supervision for a project? Absolutely get some. Even adults need to be wary, so always take safety precautions and wear protective clothing when needed. Make sure to follow any tutorials you’ve found as closely as you can.

Read The MagPi for free!

The rest of our #MonthOfMaking guide, along with loads more amazing projects and tutorials, can be found in The MagPi #91, out today, including our starter electronics guide! You can get The MagPi #91 online at our store, or in print from the Raspberry Pi Store in Cambridge and all good newsagents and supermarkets. You can also access The MagPi magazine via our Android and iOS apps.

We have a new US subscription offer!

Don’t forget our amazing subscription offers, which include a free gift of a Raspberry Pi Zero W when you subscribe for twelve months. Until the end of March, you can get a twelve-month subscription in the US for only $60! Head to magpi.cc/usa to find out more.

And, as with all our Raspberry Pi Press publications, you can download the free PDF from our website.

The post The MagPi 91: #MonthOfMaking is back for 2020! appeared first on Raspberry Pi.