Raspberry Pi Party popper launcher
The Party Popper idea was first presented as a fireworks day workshop at the Milton Keynes Raspberry Jam, and then expanded for The Girls Day at Bletchley Park National Museum of Computing, covered in The MagPi 77. The contraption enables us to remotely trigger a party popper (or poppers) with some simple Python code on our Raspberry Pi. We will first need to create a holder for our party popper, which we can design in a 3D modelling app and make with a 3D printer. Then, we will be firing it using the action of a low-cost servo. This tutorial was written by Mark Vanstone and first appeared in The MagPi 81. Sign up to our newsletter to get a free digital edition of The MagPi every month. Or subscribe in print and get The MagPi delivered to your door. 12-month subscribers get a free Raspberry Pi computer. Mark is an educational software author from the nineties, author of the ArcVenture series, disappeared into the corporate software wasteland. Rescued by the Raspberry Pi! Click here to download the source files for 3D printing the Party Popper. Build a Party Popper: Let’s start from the end Normally when introducing a tutorial, we would start with the basics and build up the idea, but in this case we need to see what we are aiming at, and then go back and put together each part of the build. This is how we approached designing the launcher: we decided what needed to happen and then worked on each part until it satisfied the requirement. So here is our impression of monkeys writing War and Peace, but we’ll miss out the bits that didn’t work. See the main image for the fully assembled launcher, and we’ll go through the parts that it’s made of. If at first you don’t succeed, keep printing! When developing a project from scratch, expect to have a few leftovers. This is a small sample The holding device The launcher was designed using Blender and then 3D-printed. The source files are all available on GitHub if you want to play with the design. First, let’s look at a way of holding a party popper; it will need to be held straight with access to the firing string. We have a tube shape, with the inside being a width to mimic the popper shape, and a hole for the ‘handle’ to…
Source: Raspberry Pi Party popper launcher
Learning to play the guitar can prove difficult for people with sight or hearing loss. Joe Birch’s accessible Chord Assist guitar is intended to make the process a whole lot easier for deaf, blind, and mute people. In Joe’s family runs a condition known as retinitis pigmentosa, which causes tunnel vision over time; it has affected his mother, who is now registered partially sighted. “Being closer to people who have this condition opened up my awareness of how it can effect peoples lives,” explains Joe. “Currently, music is something that is not so accessible to everyone, so I started to think of ways in which it could become accessible – which is where the idea for Chord Assist came from.” As well as an LCD screen, four-digit display, and buttons to show and select chords, Joe’s modified acoustic guitar features a Braille reader based on his earlier BrailleBox news-reader project. There’s even a vibrating progress indicator next to the reader, to indicate when a request is taking place. In addition, the user can make a spoken request for a chord using the built-in mic and Google-based voice assistant, and hear a response via the speaker. Also capable of playing a requested note for tuning purposes, this system makes use of Joe’s Chord Assist app on the Actions on Google platform, which can also be used as a standalone learning aid on smartphones and other devices. Extensive controls and features include selection buttons, a mic and speaker, along with a segment display and LCD screen Hidden components The whole project took Joe around six months to complete. “The most difficult part was definitely the last stages of the build process – cutting the holes in the guitar and then putting all of the parts inside became quite a tedious task,” he recalls. “I originally had everything on prototyping boards, but components kept coming unplugged. Because of this I decided to solder everything properly on PCB boards, which improved everything here.” All the electronic components, including a Raspberry Pi, are secreted inside the body of the guitar. “There’s actually a lot of stuff in there, but none of it is that heavy other than the portable battery pack.” It doesn’t seem to have an adverse effect on the sound quality either: “Initially I thought it was going to be a big problem, but when comparing it against my other guitar, there isn’t…
Source: Chord Assist
Hack electronics with GPIO Zero 1.5
The GPIO Zero library for Python now includes support for making tunes with buzzers, so it’s the perfect opportunity to hack yourself a new door-bell jingle. GPIO Zero v1.5 just came out! It’s got some new features we’re going to use in this tutorial, so make sure you upgrade! This article first appeared in The MagPi 81 and was written by Ben Nuttall. Ben is the creator of GPIO Zero and piwheels, and is the Raspberry Pi Foundation’s resident Python expert. Click here to subscribe to The MagPi in print; free Raspberry Pi with a 12-month subscription. Check that your Pi’s online, open a Terminal, and type: sudo apt update sudo apt install python3-gpiozero That will bring in the latest GPIO Zero, and will install python3-colorzero too, as that’s a new dependency of GPIO Zero. You can check what version you have by typing: apt-cache policy python3-gpiozero This will also tell you if there’s a new version available. Tonal buzzer with GPIO Zero 1.5 One of the new device classes in GPIO Zero is TonalBuzzer, which allows you to play particular tones by setting the PWM frequency. You can play a sequence of notes to make a tune, or you can make interesting sound effects like a police siren by cycling through frequency ranges at different speeds. It’s nothing like the quality you’d get from a speaker, but it’s certainly possible to make discernible tones and jingles. There’s a tonal buzzer on ModMyPi’s new Jam HAT, or you can use a normal buzzer like the one in the CamJam kit, but you’ll get better results if you use a transistor to apply 5 V to the buzzer, like they do on the Jam HAT. Playing a tune First of all, open up a Python shell or the REPL in your favourite Python editor and import the stuff you’ll need, then create a TonalBuzzer object on the GPIO pin it’s connected to: from gpiozero import TonalBuzzer from gpiozero.tones import Tone from gpiozero.tools import sin_values from time import sleep tb = TonalBuzzer(20) Now try playing a single note: tb.play(60) That will play MIDI note 60 (middle C). You’ll get an ‘ambiguous tone’ warning, but don’t worry: that’s just because the Tone interface allows you to use MIDI notes, frequencies, or musical notation. To be more explicit, you would generally use Tone(midi=60) rather than just 60 or Tone(60). Type tb.stop() to stop it playing the note.…
Source: Hack electronics with GPIO Zero 1.5
Over the past few years, we’ve been lucky to see the Raspberry Pi get more and more communication options. It’s no surprise then that there’s been great interest in getting Pi devices onto the mobile data network. SB Components’ PiTalk range does just that, except rather than stopping at just a data-capable device, the PiTalk HAT turns your Pi into a fully-fledged smartphone with voice and SMS support. This article first appeared in The MagPi 80 and was written by PJ Evans Just add SIM The standard-size HAT features a Quetec SoC that adds everything the Pi needs to get on the mobile data network; you only need to provide a micro SIM. Our tests with EE met with failure, but a Vodafone SIM worked first time. As the HAT only uses serial communications, nearly all the GPIO pins remain unused and the HAT has ‘through’ pins for further expansion. SB offers a range of small touchscreens that can be added to create a more phone-like experience. To get everything running, software is supplied, but this is squarely aimed at the touchscreen. Although we were able to make voice calls, send SMS messages, and transmit data, the interface is poor to unusable without a touchscreen. It is not an end-user product, but rather something on which other projects can be based. We were able to find an example project using Python to exchange SMS messages and trigger GPIO pins in response. It’s great for experimenting with smartphone technology, and perfect if you are interested in remote automation. Verdict 7/10 While let down by a tricky interface, the PiTalk is ideal for makers planning remote monitoring projects. It’s better combined with a touchscreen. The post PiTalk review appeared first on The MagPi Magazine.
Source: PiTalk review
Commodore monitor with Raspberry Pi inside
Over the years, the Raspberry Pi has become a firm favourite among enthusiasts of retro gaming, thanks to its ability to emulate classic computers and consoles from a bygone era. Many use packages such as RetroPie to create machines capable of playing games from multiple systems. These are usually hooked up to the makers’ big-screen televisions. When Chris Mills decided to emulate the Commodore 64, however, he had smaller ambitions. Inspired by the recently-launched miniature, THEC64 Mini, he set about producing a tinier version of the age-old Commodore 1702 monitor. Or at least he did eventually. “The original idea was to make a small box to hold the monitor and a Raspberry Pi strictly for Commodore emulation,” he says. “I wasn’t really planning on making it quite as elaborate as it turned out to be.” Chris has had an interest in computers since the late 1970s. He got a Commodore 128 in 1985, and says he likes getting things to work as much as actually using them. Cables run from the circuit board of the monitor to the back of the new case, so that the connectors are easily accessible. Components are cooled by a fan Commodore Monitor: Fast Facts The project cost a total of $120 It took around 25 hours to make The case is made of painted wood The Pi uses the C64 emulator, Combian 64 Currently, the Pi sits outside the monitor A Raspberry Pi inside a Commodore monitor Chris likes the Raspberry Pi, which is why, despite buying THEC64 Mini and enjoying its plug-and-play nature, he prefers using the Pi for his Commodore 64 games. “I can get a lot more software to run on it,” he tells us. This is mainly due to him running the Combian 64 emulator, which is a distribution based on an app called Vice. “Its single purpose is Commodore emulation, and it boots from a cold start to the blue Commodore screen in just a few seconds,” he explains. “It seems a bit closer to the real hardware experience of a Commodore computer to me and control seems far less laggy.” Hooked up to the monitor and with the mini-C64 to its side, along with a joystick, it makes for an impressive setup – in appearance alone if nothing else. Front and back, the monitor looks like a professional labour of love, with a nice retro-style finish Security monitor…
Source: Commodore monitor with Raspberry Pi inside
GTA: San Andreas Radio Set
The ‘Raspberry Pi in a vintage radio’ project is a stalwart of the community. Pi computers the world over have rescued otherwise defunct devices from the rubbish heap and are often cited as a great example of upcycling. When Raphaël Yancey, a maker from Paris, France, was gifted his grandfather’s Optalix TO100 radio, he decided to take this classic project to the next level.
This project first appeared in The MagPi issue 81. Sign up to our newsletter to get a free digital edition of The MagPi every month. Subscribe in print for 12-months and get a free Raspberry Pi computer. Raphaël’s love of Grand Theft Auto: San Andreas’s in-game radio stations inspired him: “It’s always a pleasure to steal luxury cars and drive way too fast while listening to good music! The hilarious talk-shows and skits make it even more real.” When the complete set of station recordings was released by Rockstar, some new ideas for a project started to form. With the speaker removed, we can see an elegant power solution which offers more flexibility over the Pi’s location GTA Radio: Fast Facts There are five stations, from 88.7MHz to 108.0MHz This radio used costs around £20 on auction sites The project can run for hours on batteries The rotary encoders are the popular KY040 type Raphaël wrote a Python library for the KY040s Tuning into to GTA Radio “I thought of a way to listen to the radio stations ‘in context’ without launching the game,” says Raphaël. “A radio set was the perfect choice, because: first, I had a spare one on hand; second, being able to move between the stations would make it real, like it’s taken right out of the game.” Raphaël’s radio plays five stations from the game in real-time. The radio features a ‘tuning’ knob (a rotary encoder) that switches between each station, complete with cross-fade. When you’re listening to one station, the others continue to play silently, making for a more realistic experience. “I was really looking forward to turning that knob, changing station, and then coming back to the first station to see it has lived its life without me listening to it! That little feature is what makes it real in my opinion.” Inside the radio. Note the stripped-down USB audio card used to offload the audio processing Building a GTA radio The hardware side of the project…
Source: GTA: San Andreas Radio Set
Build a Raspberry Pi Project in The MagPi 81
So you’ve set up your Raspberry Pi, surfed the web, and played around with Raspbian OS. Now it’s time to make your Raspberry Pi do something in the real world. In The MagPi #81, we look at the best way to build a Raspberry Pi project. We’ve scoured the community to get tips and tricks from famous makers; collected all the best skills and kit you’ll need; and put together a varied list of quirky and interesting projects to get you started. Click here to buy The MagPi #81. Build a car computer One of the ultimate mods is to upgrade your car with the latest computer technology. You’ll be surprised how easy it is to connect a Raspberry Pi to your car system to access telemetry data. You can add GPS and dash-cam recording functionality to your car. Everything you need to know is in The MagPi #81. Build a car computer The GTA: San Andreas Radio project Grand Theft Auto is famous for its radio stations, with folks enjoying the in-record jokes and chat as much as the music. The GTA: San Andreas Radio Set puts all this audio inside a classic radio. Use the tuning knob to switch channels thanks to a Raspberry Pi and two rotary encoders. The GTA: San Andreas Radio Putting a Raspberry Pi inside a Commodore monitor The Raspberry Pi is an excellent computer for retro emulation, and we’re no strangers to turning a Raspberry Pi into a Commodore 64. One reader has taken things to a whole new level by putting a Raspberry Pi inside the age-old Commodore 1702 monitor. The Commodore Monitor Learn to play with Chord Assist This guitar has been turned into an AI voice assistant to help deaf, blind, and mute people learn to play the guitar. Read all about it in this month’s edition of The MagPi magazine. Chord Assist This Month in Pi: Coolest Projects USA CoderDojo’s spectacular event returns to Los Angeles and showcases some of the best projects built by students across America. Coolest Projects 2019 Plus! Win One of 10 HiFiBerry DAC+ADC kits The MagPi is available as a free digital download, or you can purchase a print edition online or in stores. The post Build a Raspberry Pi Project in The MagPi 81 appeared first on The MagPi Magazine.
Source: Build a Raspberry Pi Project in The MagPi 81
Win one of ten HiFiBerry DAC+ ADC
Win one of ten HiFiBerry DAC+ ADC https://js.gleam.io/e.js The post Win one of ten HiFiBerry DAC+ ADC appeared first on The MagPi Magazine.
Source: Win one of ten HiFiBerry DAC+ ADC
Command line resources: best of the best!
Conquer the Command Line Author: Richard Smedley Price: Free PDF download/£3.99 in print Yes, we admit it, it’s a bit cheeky to start this section with our own publication, but it wouldn’t be right if we didn’t feel we could recommend it! This newly revised book from Richard Smedley adds four new chapters to this already impressive guide. This course is tailored around the Raspberry Pi experience, where others take a more ‘generic’ Linux approach. Squarely aimed at the absolute beginner, we start with how to ‘find’ the command line in Raspbian and gently up the pace, covering file handling, editing text, managing disks and networks, until finally touching upon more advanced topics such as processes and compiling software from source code. A light-hearted final chapter shows the fun side of the command line (there is one, honestly) where the student browses the internet in text-only mode, and it’s not as pointless as you would think. Throughout the guide, hints and tips grace the margins with shortcuts and technical explanations that even made this seasoned reviewer take a few notes. This is a great start for your command-line adventure, but not for those looking to deep-dive into shell scripting and other more advanced topics. Start here. The Linux Command Line The Linux Command Line Author: William Shotts Price: £23.79/free download So, you’re serious about the command line. You want to be a master; a guru. You picture people spending days climbing a mountain just to meet you and ask about that obscure tar parameter. Well, you’d better get reading this book. The Linux Command Line, now in its fifth edition, is as close to a definitive guide as you’re likely to get. This is a real no-messing-about guide to controlling Linux systems, Raspberry Pi’s Raspbian included. No stone is left unturned as we go from first principles through to advanced topics such as scripting, even including a chapter on many experts’ favourite text editor vi, famed not only for its power but also its steep learning curve. The content is well organised, almost academic in structure. This can look a little intimidating, but the author’s writing style is friendly and accessible, avoiding arcane language. Especially impressive is the time taken to explain concepts and terms that others would (wrongly) assume the reader would understand. Shotts, a firm believer in the open-source movement, has made the book available as a free…
Source: Command line resources: best of the best!
Code Pac-Man in Python (part 2)
Coding a Python Pac-Man-style game is a great way to learn more about Python programming and Pygame Zero. In the first part of our Pac-Man-style tutorial, we created a maze for our player to move around, and restricted movement to just the corridors. We provided some dots to eat and some ghosts to avoid. In this part we are going to give the ghosts some more brains so that they are a bit more challenging to the player. We will also add the bonus power-ups which turn the ghosts into tasty edibles, give Pac-Man some extra levels to explore and some extra lives. So far in this series we have not dealt with music, so we will have a go at putting some music and sound effects into the game. The code is in this tutorial explains how the game works. Make sure you download the code from GitHub and use this tutorial as a code-along. This tutorial was written by Mark Vanstone and first appeared in The MagPi 77. Join our newsletter for a free digital edition every month; or subscribe to The MagPi for 12-months in print and get a free Pi Zero W & Starter Kit and a copy delivered to your door every month. See also: Make with code in The MagPi #77 Pygame Zero Invaders and Pygame Zero: Space Invaders II The best Python websites and resources Create a Python game: how to make a puzzle game called Same A more advanced Pac-Man in Pygame Zero In part one, we left our ghosts wandering around the maze randomly without much thought for what they were doing, which was a bit unfair as Pac-Man could evade them without too much trouble. In the original game, each ghost had a program that it followed to characterise its movements. We are going to add some brains to two of the ghosts. The first we will make follow Pac-Man, and the second we will get to ambush by moving ahead of Pac-Man. We will still leave in some random movement, otherwise it may get a bit too difficult. Pac-Man Python: what you’ll need Raspbian Jessie or newer An image manipulation program such as GIMP, or images available here The latest version of Pygame Zero (1.2) The pacman2 folder from GitHub USB joystick or gamepad (optional) Headphones or speakers Pac-Man gets points for eating dots, and ghosts after eating power-ups Follow…
Source: Code Pac-Man in Python (part 2)