Schlagwort: minipc

  • Build a Pico Pomodoro timer

    Build a Pico Pomodoro timer

    Reading Time: 6 minutes

    But pairing a Raspberry Pi Pico with the bright LEDs of a Unicorn Pack means you can see at a glance when your next break is approaching and, if you keep it just out of your eyeline, that warm red glow is a reminder to carry on working.

    Step 01: Give your Pico some pins

    We want to attach Pico to a hardware array of LEDs – but, as Pico lacks the GPIO header of a regular Raspberry Pi, we’ll first need to solder a header to the long row of holes on either side of Pico itself. With the USB socket uppermost, fit Pico over the shorter pins on either header and use a small amount of solder on each one to create a contact with the corresponding metal strip on Pico. Don’t allow solder to stray across adjacent strips or pins, or you’ll create a short circuit.

    Step 02: Fit the Unicorn Pack

    When the solder has had time to cool, turn over Pico so that the longer end of each pin is pointing up and the USB socket is underneath. Now check the back of the Unicorn Pack, where you’ll see there’s a white painted illustration of Pico’s USB socket. Line up this illustration with the actual USB socket, then press the Unicorn Pack onto the header pins on Pico. Be firm but gentle and try to keep equal pressure on either end to reduce the risk of bending any pins on either of the headers.

    Step 03: Flash Pico body

    Your Pico contains a web link to Raspberry Pi’s own firmware, but this doesn’t include the additional hooks required to work with the Unicorn Pack. Instead, you need Pimoroni’s custom MicroPython firmware image. Point your browser at magpi.cc/pimoronipicoreleases and download the most recent UF2 (.uf2) file – examples for use are at magpi.cc/pimoronipicogit. Press and hold Pico’s BOOTSEL button while plugging it into a USB port on your computer (Raspberry Pi, PC, or Mac). When it appears, drag the UF2 file from your Downloads folder onto Pico. It will then reboot with the updated firmware.

     The LEDs are extinguished at different rates for the work and rest cycles

    Step 04: Redirect Thonny body

    We’ll code Pico using the Thonny Python IDE, which is included in Raspberry Pi OS, and free for Windows and macOS (thonny.org). By default, it works with and executes code stored locally, but we want to address Pico directly so that we can take advantage of the custom firmware. Click Python in the lower-right corner of the Thonny window and select ‘MicroPython (Raspberry Pi Pico)’ from the list of options to redirect its output – you’re now ready to start coding. Make sure you save your code regularly as main.py and, when asked where you want to save, choose ‘Raspberry Pi Pico’.

    Step 05: Set up the environment

    The first three lines of code set up the environment in which our program will run by referencing the libraries that handle time and the specific features of our Unicorn Pack add-on. We’ll use the utime library to count the length of each work and rest cycle – which are 25 minutes (1500 seconds) and five minutes (300 seconds) respectively – and divide the number of seconds in each stretch by 112. Then, every time one 112th of a cycle has passed – 13.4 seconds on a work cycle and 2.7 on a rest cycle – we’ll extinguish one of the LEDs on the Unicorn Pack.

    When fitting the Unicorn Pack to Pico, match the rear illustration to the USB socket to make sure it’s correctly orientated

    Step 06: Define a new process

    We’ll define a process that can be kicked into action as soon as the X button is pressed. We’ve called this process

    pomocycle

    , as detailed on line 6. The first job is to define the variables we’ll be using, which include values for the red and green mix in the colours we want to display (red for work, green for rest), and a column and row count. Why 6 and 15 when there are 7 rows of 16 LEDs on the Unicorn Pack? Because the first row and first column of each is counted as 0, not 1.

    Step 07: Build them up…

    We now start a loop that keeps running as long as button Y hasn’t been pressed. If it has, we exit the process and go back to waiting for a press of the X button, which starts the work and rest cycles all over again. The first job is to illuminate every LED on the Unicorn Pack, so we work through a couple of cycles, one of which is embedded within the other so they can target each pixel directly and set it to either red or green, depending on whether we’re working or resting, as defined in both the opening variables and the reset cycles that appear later in the code.

     When first connecting Pico to your computer, hold the BOOTSEL button to mount the file system so you can transfer the necessary firmware

    Step 08: …and knock them down

    Now we start extinguishing the LEDs one by one. The important element here is the multiplier, which defines how long Pico will wait after turning off a light before targeting the next one. We could have told it to wait 13.4 seconds between each action in a work cycle, or 2.7 seconds in a rest cycle, but if we did it would only be possible to interrupt a cycle by pressing Y every 13.4 or 2.7 seconds, which would both feel very unresponsive, and be extremely irritating. We need to find a way of checking the button’s status during a sleep cycle.

    Step 09: Wake, sleep, repeat

    The solution is to only sleep for 0.1 seconds before checking the status of the button, and to use the multiplier to define how many times the sleep/check cycle is repeated. By repeating it 134 times for each LED when working, it will take 1500.8 seconds to extinguish all of the LEDs. Conveniently, that’s 0.8 seconds longer than a 25-minute work cycle. On a rest cycle, we set the multiplier to 27, so the repeat the sleep/check process loops 27 times for each LED, the last of which will then extinguish after 302.4 seconds, which is five minutes and 2.4 seconds.

    Make sure you select the ‘MicroPython (Raspberry Pi Pico)’ interpreter when working with code in Thonny

    Step 10: Subtract and start again

    Every time an LED is extinguished, we subtract one from the column count and, when the next loop repeats, the LED in that spot will go out. Remember, the first column is column zero, so when the column count number hits -1 we reset the counter to 15, and instead subtract one from the row count. This continues until the row counter also hits -1, when we know there are no remaining illuminated LEDs. At this point, if we’ve been on a 25-minute work cycle, we need to switch to a five-minute rest cycle, and vice versa.

    Step 11: Reset the variables

    If we were working, it’s time to rest. So, we set the multiplier to 27 and swap the values for the red and green tones we’ll use to illuminate the LEDs. Then, when the process restarts, the LEDs will shine green and blink out more quickly as they count to the end of our break. If we had been resting, the LEDs are instead set to red, and the multiplier is again set to 134 to slow down the rate at which they disappear. The code now rewinds the defined process, illuminates each LED as appropriate, and starts the next countdown.

    Step 12: Keep everything running

    At this point, our code is all but complete. We just need to define what happens when we press the Y button. That’s handled in lines 52 to 54, which simply extinguish any remaining LEDs on the Unicorn Pack by setting the red, green and blue value for each one to zero. Then, the code comes to an end. With nothing else to do, Pico returns to where it started, waiting for the next time the X button is pressed, at which point the

    pomocycle

    process kicks into action once again.

  • Turbo-charge Raspberry Pi 400 with an M.2 SATA SSD drive

    Turbo-charge Raspberry Pi 400 with an M.2 SATA SSD drive

    Reading Time: 5 minutes

    Recently we looked at a superb case from Argon (magpi.cc/argononem2) which transformed our Raspberry Pi 4 by upgrading the boot drive to an M.2 SSD.

    The result was a tenfold increase in storage speed, making for faster performance across the board. Apps load more quickly, and browsing the internet is vastly improved. M.2 SATA is also great for working with large, demanding files such as video, large photo images, and big data files.

    The M.2 SSD adapter translates the SATA III interface on the M.2 SSD drive into a USB-C connection. This is used with a USB-C to USB-A cable to connect the drive to the blue USB 3.0 connection on Raspberry Pi 400

    The latest offering from Raspberry Pi and our favourite all-in-one computer is Raspberry Pi 400.

    So we set about sourcing a compatible solution for Raspberry Pi 400. Thanks to the USB 3.0 ports on the rear of Raspberry Pi 400, and recent default support for USB boot, it turns out to be easy to upgrade a Raspberry Pi 400 in the same manner.

    All you need to do is source a compatible M.2 SATA drive and M.2 SATA to USB 3.0 enclosure. Put the two together and hook the unit up to Raspberry Pi 400, then copy across the operating system and you’re good to boot.

    A Transcend M.2 SSD drive with a SATA III connection (on the left)

    We used a Transcend M.2 SSD 430S and Transcend TSCM42S USB enclosure. The Transcend 430S was 512GB, a mighty upgrade from the 16GB card included with Raspberry Pi 400. However, you don’t need to purchase such a huge drive and the 128GB model will be more than enough for most use cases.

    01 Assemble the drive

    We start by assembling the M.2 drive enclosure. Our M.2 SATA to USB 3.1 SSD Enclosure Kit (TSCM42S) contains a SATA III to USB board that the M.2 SSD is mounted on. Place the SATA III interface into the socket and gently push the M.2 SSD. Then, a single screw is used to hold the M.2 SSD in place. Once the M.2 SSD drive is affixed to the board, we use the enclosure to contain it. The assembly process will vary depending on which M.2 drive and enclosure you use, but most will follow a similar pattern.

    02 Set up the drive

    If you want to install a fresh installation of Raspberry Pi OS to the M.2 SSD drive, then use Raspberry Pi Imager (magpi.cc/imager) to install the OS directly to the drive. You can do this on any computer, including your Raspberry Pi running from a microSD card. See the ‘Using Imager’ box (overleaf) and head to Step 4 after installing your fresh installation.

    Another option is to boot your Raspberry Pi from the microSD card and clone the current operating system to the M.2 SSD drive. Boot Raspberry Pi 400 from the microSD card and – once Raspberry Pi OS is running – make sure your microSD card is running the latest version of Raspberry Pi OS:

    sudo apt update sudo apt full-upgrade

    03 Copy the drive

    Connect the M.2 drive to one of the two blue USB 3.0 connections. Open the Raspberry Pi menu and choose Accessories and SD Card Copier. Choose the microSD card in Copy From Device; ours is marked ‘SC16G (/dev/mmcblk0)’. In Copy To Device, select the M.2 drive. It should be mounted on /dev/sda and the only other option available.

    SD Card Copier is used to duplicate the boot image on your microSD card to the M.2 SSD drive

    Make sure to tick New Partition UUIDs (this will enable you to mount and access both devices at the same time). Click Start and Yes at the ‘erase all content’ warning menu to begin the copying process.

    04 Boot into M.2

    When SD Card Copier has finished duplicating the contents of the microSD card to the M.2 drive, you will be able to use the latter to boot and run your Raspberry Pi 400.

    GNOME Disks running a benchmark test that shows the M.2 SSD drive running vastly faster than the microSD card

    Power off your Raspberry Pi (choose Shutdown > Shutdown from the Raspberry Pi applications menu). Now remove the microSD card from Raspberry Pi as it has boot priority over the external M.2 drive. Press the FN and Power (F10) keys to power Raspberry Pi 400 back up. It will boot and run from the M.2 drive.

    05 Install GNOME Disks

    You should notice a speed improvement when using the M.2 drive over the microSD card.
    Opening programs and browsing the web will be much faster. To get detailed information about the speed of M.2, you can benchmark the drive with GNOME Disks. Open a Terminal window and install it with:

    sudo apt update sudo apt install gnome-disk-utility

    Open the Raspberry Pi applications menu and choose Accessories > Disks to open GNOME Disks.

    06 Speed-test drive

    Select the rootfs partition and click the ‘Additional partition options’ icon (shaped as two
    cogs); choose Benchmark Partition. Click Start Benchmark and Start Benchmarking to test the drive. We get an average read rate of 382.4MB/s (much faster than our microSD card).

    Insert the microSD card and select it in GNOME Disks to perform a comparative test. We get just 44.9MB/s in comparison.

    07 Swap boot order

    You can now use Raspberry Pi 400 with the M.2 drive attached and the microSD card ejected (as it will boot from the M.2 drive). If you insert the microSD card, the EEPROM (electrically erasable programmable read-only memory) in Raspberry Pi 400 will prioritise the microSD card over USB.

    Following a recent update to raspi-config, the option to prioritise USB boot over microSD is just a few clicks away. Open Terminal and enter:

    sudo raspi-config

    Use the arrow keys to choose Advanced Options and Boot Order, then pick ‘B2 USB Boot’. The screen will say ‘USB is default boot device’. Press ENTER and choose Finish and then Yes to ‘Would you like to reboot now?’

    When Raspberry Pi reboots, it will start up from the M.2 SDD connected to USB (even if the microSD card is inserted). You can now use your Raspberry Pi 400 with the M.2 SSD drive as the default.

  • Real-time bee monitor

    Real-time bee monitor

    Reading Time: 3 minutes

    Led by computer scientist Michael Smith, a team of researchers from the University of Sheffield and The Bumblebee Conservation Trust have figured a way to make the striped insects easier to spot. They’re dressing bees in hi-vis retroreflective vests and taking photographs of the environment, before subjecting them to a machine learning model that operates in real-time.

    “I was reading books by Dave Goulson, who described the problem of finding the nests of bees, and it got me thinking of ways to spot them from a distance without needing an electronic tag,” Michael tells us. “When I was cycling home one evening, I noticed how retroreflectors are very noticeable when lit by the blinking bike light.” It was a eureka moment.

    Bee-hold Raspberry Pi

    Michael devised a method in which two photographs would be taken of an environment – one using a camera flash and the other without. He experimented by connecting a Raspberry Pi 3 to an industrial global electronic-shutter camera, but soon switched up to a Raspberry Pi 4. “The better CPU meant we could process images much faster and the extra memory improves the image analysis as more images can be processed at once,” he says.

    Study co-author Mike Livingstone is catching bees from the researchers’ nest in order to tag them

    The method depends on being able to take a flash photograph, so the camera needs to be able to expose the entire sensor at once, not just scan lines. “The very short exposure you can get with the electronic shutter (down to one microsecond) means I can match the exposure to the length of the flash, which is a few microseconds,” Michael continues. “It means almost all of the illumination in the photo is from the flash, even on a bright sunny day, and so it’s easier to detect the retroreflector.”

    Hive of activity

    The machine learning process subtracts one photo from the other, leaving an image containing bright spots if the retroreflector-wearing bees happened to be in the frame.

    Since the tracker works best when it’s looking down and is away from clutter, the scientists have experimented with ways of getting the system in the air, trying a hexacopter UAV, a 10 metre mast, and a tethered balloon

    “Machine learning helps to remove false-positive spots caused by other objects such as moving trees and litter,” says Michael, who collected the machine learning data with two of his students – Isaac Hill and Chunyu Deng – by walking around in front of the tracking system with a reflector on the end of a stick.

    “To build the system, we manually labelled where our reflector was in the photos afterwards. These labels, combined with false positive dots in the same images, were used to train the classifier, and we used Raspberry Pi OS, Python 3.x, standard libraries, and the Aravis library to interface with the camera and process the results.”

     The retroreflective tags placed on the bees are made of the same fabric as the high-visibility vests worn by cyclists

    So far, the team have been able to detect bees from up to 40 metres away and this has thrown up some surprising results. On one occasion they found buff-tailed bumblebees up a pine tree some 33 metres distance in a location the researchers wouldn’t have usually looked.

    “We’ve used the trackers in gardens, fields, and at various places on the university campus, but we’re in touch with other researchers who will be using them for looking at the initial flight of bees as they leave nests or for monitoring bees foraging inside glass-houses. It also makes sense to think about tracking and detecting other insects. There are a lot of open research questions in behavioural entomology.”

  • ML-based Bird and Squirrel Detector

    ML-based Bird and Squirrel Detector

    Reading Time: 3 minutes

    One day, while looking out of his window, a flash of inspiration came to him. “You really want a lot of data for machine learning – the more the better. I was looking out the window at my bird feeder and I realised that there were probably hundreds of birds visiting it daily, so that would be perfect! I added squirrels to the mix because they are always hanging around the feeder, hoping they can figure out how to break in.”

    Eagle eye

    And so, Mike began work on his Bird and Squirrel Detector, a marvellous make that utilises a Raspberry Pi, a High Quality Camera, some clever code, and Amazon Web Services image recognition (aka AWS Rekognition). Mike set his Raspberry Pi up to run PI-TIMOLO, a downloadable software module that watches for motion and takes a snap when it detects any.

     The camera is pointed at the bird feeder. Mike started with a cheap telephoto lens, but switched to one borrowed from his Canon EOS camera

    “I have a Python program that runs on the Raspberry Pi that watches a folder for new photos. If it sees one, it makes an API call to AWS to send the photo to an AWS ‘bucket’,” Mike tells us. In AWS, he has a Python Lambda function (a cost-effective way of running code) that watches the bucket, waiting for photos. His Lambda takes the photo that just arrived and then sends it to Amazon Rekognition, which then uses its ML-based image recognition capabilities to try to assess what the photo contains.

    “Amazon Rekognition replies with a list of ‘labels’ (that’s a machine learning term that describes what an ML algorithm thinks is in the picture),” explains Mike. “Then my Lambda code looks at the labels and decides if the image contains a bird or squirrel. Based on this, it sends a message to an AWS service called Simple Notification Service (SNS). You can subscribe to an SNS ‘topic‘ and ask it to send you emails or texts. So I have one SNS topic for birds and another for squirrels, so I know what’s in each photo.”

    Winging it

    Mike needed to tweak some of software parameters in order that the trigger to take the photo was just how he needed it. He wanted images of the birds and squirrels and not anything else. “You want to make sure you don’t miss good photos, but you don’t want to snap a picture every time a tree branch moves in the background, or you’ll end up with thousands of photos per day.”

    A red-bellied woodpecker pays a visit to Mike’s bird feeder. Standard AWS Rekognition identified it as a ‘woodpecker’

    In addition, he says, “The other bit of fine-tuning that took some time was filtering out all of the uninteresting labels Amazon Rekognition returned. It tells you everything it thinks it sees in the picture. So it won’t just identify animals, it will also tell you it sees a bird feeder, or a chair. Or it might tell you it sees trees and grass, which may be accurate, but you don’t care about that.” So, he built up a list of ‘uninteresting’ labels over time, and filtered them out so he was only informed of bird and squirrel sightings.

    Mike describes the feedback he’s had from other makers as “amazing”, and is glad to share his insight into both the possibilities and limitations of AI. He’s also discovered the fantastic Raspberry Pi team spirit: “A cool thing about the Raspberry Pi community is that you can reach out to people and they will really help you.”

  • Learn Game Development with Raspberry Pi

    Learn Game Development with Raspberry Pi

    Reading Time: 3 minutes

    itch.io

    itch.io

    For most developers of games, the main reason to create a game is to challenge others to play their game. So the first question is: how can we make a game available for other people to play? That’s where itch.io comes in. The website provides an app store-style platform for independent developers to upload and sell their games. 

    Games can be built and uploaded in all kinds of formats. They can be built as executables, source code downloads, or online browser games. There is a large active community and regular competitions to reward the best games. The itch.io site is free to use and provides lots of support for new developers and if you want to sell your game, they will deal with all the payment process but of course, ask for a small cut of the profits. 

    Currently there are over 300 thousand games hosted on itch.io, so you can have a good look around and see what everyone else has uploaded and get ideas about how to present your new game to the world, get feedback from players, and even make a bit of money.

    Creator

    Itch corp 

    Price

    Free / Percentage of sales

     Link

    itch.io

    Scratch

    Scratch

    Scratch is available as a game and animation development system, both in a browser and as an offline program. Both work and look very similar. Scratch is an excellent introduction to programming and provides a visual block interface to create interactive content. You can share games that are created with Scratch and there are lots of examples on Raspberry Pi’s website for you to see what others have done with Scratch. Graphics and sounds are included in the Scratch library, but you can also create your own using the built-in pixel editor or a separate paint package. There are extra extensions you can add to connect to external projects and a whole range of tutorials to show you how to get started making the game of your choice.

    Creator

    Scratch Foundation 

    Price

    Free

    Link

    scratch.mit.edu

    Raspberry Pi Game Projects

    Raspberry Pi Game Projects

    Since the launch of Raspberry Pi, the Raspberry Pi Foundation has been producing example projects of all kinds on its website. In the game section, there are around 60 projects for you to delve into and find out how they were made and download the elements you need to build them. There are projects for Scratch, Python, web browsers, and even games to play with external hardware like the Sense HAT. Each project describes what you will need to make it, shows the finished project, and then walks you through, step by step, what you need to do from beginning to end. You will also find suggestions for other projects to look at after you have finished, to progress further with your game development experience.

    Creator

    Raspberry Pi Foundation

    Price

    Free

    Link

    magpi.cc/projects

  • METAR map

    METAR map

    Reading Time: 3 minutes

    Philip had long been fascinated “that a small, tiny Raspberry Pi is more powerful than the first full-size computer I sat in front of a long time ago when I was a child.” He also knew that Raspberry Pi would be very easy to use and set up and expand its functionality over time. He decided on a Raspberry Pi Zero W since the program does not need a lot of power, he could connect to it over a wireless network to make changes to the code without having to plug it into the computer. He’s recently added a mini LED display to the setup. 

    Plane spotting

    Philip’s previous projects include a PiAware aeroplane tracker which logs flights over his house and reports them to FlightRadar24, plus a Raspberry Pi 3-based Stratux box which monitors nearby planes while you’re in the air. These gave him a great start when designing the METAR Map, for which he was mainly focused on developing his Python skills.

    METAR data can be pulled from a site such as aviationweather.gov, which uses familiar airport short codes. Write these codes on the back of your map when attaching your LEDs

    Having seen the concept floated in a Reddit post, Philip and his partner – also a dedicated crafter and plane nerd – decided to work on it together. “It took a little bit of learning about language and piecing together various libraries to make the lights, and everything come together.” The project cost around $100, with the shadow box picture frame representing the biggest outlay. It would be perfectly possible to make your own frame, of course. The LEDs and Raspberry Pi Zero require little power, so the running costs are negligible.

    Philip wrote the code himself and is proud of the way he pieced the project together with eye-catching elements such as using the NeoPixel library to communicate with the LEDs, while keeping things simple so that others could build METAR maps of their own. Having posted the project on GitHub, Phiilip’s been delighted by the “awesome” METAR maps other people have created and has added functionality based on GitHub users’ requests.

    LEDs taped to back of the map

    Refinements include making the lights blink if there are high winds at an airport and another addition to make the LEDs flash white if there is a lightning storm in the area. He’s recently added a small LCD which shows full weather information for the airports.

    Mighty maps

    Although Philip created his METAR Map with aviation weather in mind, he says it could easily be adapted by someone who wanted to make a similar map to visualise the weather in nearby towns or cities. “All that would be needed would be an online source to get the weather data.”

    Fellow aviators have taken his project to heart. “I’ve had quite a few pilots contact me who said they have never written any code [but who] were able to successfully put it all together and showed me their creations.” 

  • CNC Plotter

    CNC Plotter

    Reading Time: 3 minutes

    That’s just what he did, creating his own CNC plotter in the process. “It is controlled by Raspberry Pi and can draw an image on a surface the size of a piece of A4 paper,” he tells us. “I have designed and built both the hardware and the software myself. I have assembled its hardware by using recycled parts from an old scanner and a printer.”

    He also wrote the Python software which runs on Raspberry Pi. “It is an interpreter which reads and executes the G-code from a text file and drives the stepper motors.”

    Switching to Raspberry Pi

    According to Stratos, a lot of the projects he’d seen were made with Arduino, so he decided to see if it was possible with Raspberry Pi.

    The extra servo on top is to lift and lower the pen. With some string, of course

    “I started experimenting with one stepper motor with a Raspberry Pi,” he says. “Fortunately, I was lucky enough to have salvaged one stepper motor from an old printer and another one from an old scanner. In the beginning I had to find out how stepper motors work and how to connect one to Raspberry Pi. Then I tried to drive the stepper motor by writing a small program in Python and run it on Raspberry Pi. Once I managed to make this work, I got very excited and this gave me the push to continue with controlling two stepper motors at the same time. This was the most tricky part because I had to find a way to move the two stepper motors in parallel if I ever wanted the CNC plotter to draw a diagonal line. I had been trying several algorithms in Python for a long time, but eventually the simplest one worked how I wanted.”

    Recycling to work

    The end result is a little robot that can draw – exactly as planned. You can see it in action on YouTube.

     Talking about recycling old tech, an original Raspberry Pi Model B was used for the programming

    We’re big fans of recycling and upcycling for projects here, and recycling was always part of Stratos’s plan. “I wanted to minimise the cost of the project as much as possible in order to find out how cheap it can be,” he says. “That is the reason that I reused parts from an old scanner and a printer for the hardware part. Also, I used L293D chips instead of the [more expensive] L298D motor driver board, so the only cost was actually a Raspberry Pi and its accessories, which I owned anyway.

    “Moreover, I implemented the software program myself because I wanted to find out the internal working of a CNC plotter. “So I would say the only thing that it cost me mainly was my time, which I enjoyed spending while doing this project!”

  • Amiga Pi 600

    Amiga Pi 600

    Reading Time: 3 minutes

    Such news excites Amiga fans. “The price of used Amigas has skyrocketed over the last five years and it’s not an easy task to preserve an old computer,” explains Billy Nesteroulis, aka DJ Nest. “If you own an old Amiga, it will eventually break: their electrolytic capacitors tend to leak. You’ll need a new power supply, and some kind of memory expansion is ideal.”

    With a Raspberry Pi computer, however, such costs can be significantly lowered. As Billy has shown, it’s possible to build an Amiga 600 from scratch with a Raspberry Pi 4 as the main unit. “Raspberry Pi can emulate an Amiga with AmigaOS and you can use it to play games and software made for the machine,” he continues.

    On the case

    Certainly, Raspberry Pi has proven to be the perfect platform for Amiga emulation. “Dimitris Panokostas has done a remarkable job creating the Amiberry emulator and because Raspberry Pi hardware is small, it can fit easily almost everywhere,” Billy says.

    A nine-pin joystick from an original Amiga computer can be used with the USB adapter by Retronic Design (retronicdesign.com)

    In this instance, the single-board computer has been fitted inside a full-size, 3D-printed replica of an Amiga 600 case, allowing use of its USB ports and WiFi. A specially designed keyboard that was originally designed as a replacement for ageing Amiga machines is connected and modern adapters will allow use of the nine-pin joysticks of old for added authenticity.

    “The Cherry MX keyboard is illuminated and it was designed to fit the case that I 3D-printed,” Billy explains. “The joystick adapter is plug-and-play with no drivers needed and you can also use Amiga CD32 joypads with their eight buttons.” Other parts include a micro HDMI extender, SD card extender, power supply unit, USB extenders, a power switch, and LAN extender.

    A modern touch

    To ensure everything runs smoothly, Billy uses the Amibian distro (“the most complete experience of the classic Amiga environment”). He also likes that – in exchange for a small donation – he can use the Amibian 1.5 Extended Edition made by Gunnar Kristjánsson. 

     Raspberry Pi Amiga 600 is the same size as the original A600

    “The Extended Edition includes Raspbian Buster V10 OS with the look and feel of the Amiga OS 4,” Billy says. “It has a modern browser, the VLC media player, and the Qmmp audio player. You can even use LibreOffice Writer.”

    Amibian also allows users to update software and Amiga emulators through its configuration tool. All of which has meant Billy’s set up expands the potential of the machine, beyond matching the real A600. “It’s allowed me to bond classic computing with modern computing,” he says.

    Indeed, the Pi 600 gives the same feeling and experience of the actual A600, but with the modern touch of the Raspberry Pi hardware. “It has the required juice to run specific software such the classic pixel-art package Deluxe Paint, games play without issues, and you can build your own system and adapt it to your needs,” Billy says. “For many people, it’s the best Amiga solution in 2021.”

  • Review: Raspad 3

    Review: Raspad 3

    Reading Time: 3 minutes

    The smaller “microSD Card and Button board” connects to the microSD port on Raspberry Pi and enables three buttons (power, and brightness controls).

    Inside the large wedge at the bottom sits a three-cell 3Ah lithium battery (we got two-and-a-half hours of use).

    One notable absence from the case are GPIO pins. However, a small gap in the case enables you to feed a  ribbon cable to extend the GPIO header.

    We found assembly easy. Use four screws to affix Raspberry Pi 4 to the case then use the USB cables, Micro HDMI cables and Type C to connect Raspberry Pi 4 to the Main board. FFC cables are used to connect the smaller daughterboard to Raspberry Pi. These are easy to connect but the instructions do not mention how to gently pull out the connector and push them back in to lock the cable.

    Three small heat sinks are attached to the Raspberry Pi and a fan screwed in place to the bottom half of the case. Finally, a neat touch. A small Accelerometer SHIM Module is placed on top of the GPIO pins on Raspberry Pi. When running the Raspad OS this enables a rotating display. Four more screws are used to assemble the case. It’s important not to leave the microSD card inserted when assembling or disassembling the case as it will (and indeed did) break.

    Custom OS

    Raspad OS is based up the latest Raspberry Pi OS but with a refreshed interface with larger, touch-friendly buttons; additional software support and tablet-friendly features: there’s an on-screen keyboard and support for the aforementioned accelerometer.

    RasPad OS makes Raspberry Pi OS touch- friendly, adds support for the rotating screen, and provides an on-screen keyboard

    One aspect of Raspad 3 that disappoints straight out of the box is the built-in fan (which you will quickly remove). We’ve never encountered a Raspberry Pi product that makes such a persistent noise. It’s been measured at 50 dB and there we found no fan throttling in software or hardware.

    We found the fan intolerable to the point where we re-opened the case and removed it and dug out our heat testing setup to see what performance was like without. We measured the idle baseline temperature at 65 c and it ran at full stress for several minutes before hitting the 80c mark (where Raspberry Pi OS starts to throttle back performance). We found little difference to using a Raspberry Pi in the official case. As usual, we see no no reason for a fan to be used with Raspberry Pi unless you plan to overclock. Once the fan was stripped out we were able to appraise Raspad 3 with kinder eyes.

    As a tablet it functions well. The screen is nice to look at, and touch-screen performance is snappy and quickly responds (if a little haphazardly). While functional, the on-screen keyboard is too small for our fingers and a chore to type on. Still, you can add a bluetooth or wired keyboard for more detailed work. It’s chunky but you can hold Raspad in your hands and rotate it around like a commercial tablet. While on a surface the wedge provides two distinct viewing angles. You do lose the ability to use the touchscreen when a second monitor is attached, but it performs admirably as a smaller second display.

    Raspad 3 is terrific for demystifying the technology that underpins tablets (key technology in many younger learners’ lives). It may be chunky, but you can open it up and see the processor, screen, battery, accelerometer in action. It may not be as slick as a commercial tablet, but the learning process is more rewarding.

    As a daily device things are less impressive. It’s painful to watch Raspad 3 side-by-side against pi-top’s FHD TouchScreen and Bluetooth keyboard. The extra money spent on the pi-top is well worth it.

    Meanwhile, at the lower end of the scale devices such as SmartiPi Pro offer a similar touch-screen display setup at a much more affordable cost.

    Verdict

    6/10

    It’s easy and fun to set up Raspad 3 but once the tablet components lesson is over it’s not great fun to use. Jarring elements (in particular the fan) don’t help. There are better Raspberry Pi 4 tablet and laptop options on the market. 

  • AirMyPrayer

    AirMyPrayer

    Reading Time: 3 minutes

    “My project involves streaming live audio and video from houses of worship (actually from anywhere with internet) to social media platforms such as YouTube, Facebook and more uniquely, straight to people’s homes,” Abid explains. “I have also designed and implemented an integrated prayer timetable.”

    The prayer timetable is something Abid has been working for about nine years, when he noticed people were ringing up their local mosque to check on any changes to prayer times, which could happen every week. “This had me thinking that we need a way for the prayer times to be accessible on a virtual platform for users,” he says.

    Virtual timetable

    Luckily, he was thinking about how to digitise the timetable at a very fortunate time. “After some research about what platform I could use to host such a project, the original Raspberry Pi was already on the market and seemed in theory to be the natural choice,” Abid recalls. “Possibly the only practical choice as there was nothing else in the market in my budget range.”

    A simple mosque-side AirMyPrayer setup, which allows for voice transmission

    Using a client server setup, he was able to deliver a practical working example that is now being used in a several mosques. “To make it easier for the technophobes, I also have connected a Raspberry Pi to a smaller touchscreen monitor so one can easily change the congregational times,” he adds.

    The prayer timetable is only one part of the system – the other is a broadcasting system. “Mosques up and down the country traditionally have used UHF radio transceivers to transmit sermons or call to prayers to people’s homes,” Abid says. “Unlike experiencing the call to prayer in Islamic countries over the loudspeaker, the best alternative was to receive it through UHF radio receivers installed in homes.”

    Online solution

    As the internet is more accessible now than the range of these transceivers, it was a logical way of upgrading these calls to prayer. Abid got to work.

    The home AirMyPrayer has many features that make it easy to connect to the internet to receive calls to prayer

    “I came up with three key requirements,” he explains. The first is to deliver five times daily “a call to prayer and sermons/events to people’s homes using audio and/or video reliably without any user invention and fully automated. Secondly, it needs to be a budget system as dealing with charitable organisations. Lastly, it needs to be portable so can be used in any organisation with Internet availability.”

    The current AirMyPrayer system consists of a broadcasting Raspberry Pi at the mosque, which can use cameras or just a microphone, and a Raspberry Pi 4 that can receive the internet broadcast for people in their home. It uses a small touchscreen and is highly customisable – you can even connect to it on a phone. Check the website for more details: airmyprayer.co.uk.

    Reception has been mixed – the older system has been in use for a long time, so changing to a new one has not been quick according to Abid. “However, with incremental improvements to the design and a focus on a more friendly user experience, the device became more accepted and now there are over 150 devices around my local area and still growing.”

  • Interview: Tanya Fish

    Interview: Tanya Fish

    Reading Time: 2 minutes

    “When I was 16, my dad put a Ford Sierra in front of me and said ‘take that apart’. I’d been taking things apart throughout my childhood and I think that was the first thing that was physically useful. I was lucky enough to work with a drag racing team for a few years on a Fuel Altered that did the quarter mile in 7.4 seconds. I carried on making anything I could, woodworking, drawing, knitting, crochet, smaller things mainly, then I discovered Raspberry Pi and got into learning my way around a Linux operating system, and started to teach myself Python.”

    After working for our cool, gadget-making pals Pimoroni, Tanya is back at school working towards a PhD “in the effects of STEM outreach in schools”.

    Tanya continued the tradition of making earrings resembling new, tiny Raspberry Pi boards – this one a handmade Pico

    When did you learn about Raspberry Pi?

    Probably in the later half of 2012, and a lot of my friends were using them as media servers. I got one for Christmas 2012 – and I still have it! I’ve used every model since, and I liked it that they were small enough to build into projects.

    What is your favourite way to interact with the community?

    My favourite way to get involved in the community is by volunteering at events like Raspberry Jams, sometimes giving talks, workshops, or just bringing along a project to talk about. Luckily, my previous employers were really supportive of that, and I loved standing at the stall and chatting with people about what they were making, and helping out with equipment choices. I try to write up personal projects, but documentation is time-consuming!

    "I also did a kids’ nightlight using a Raspberry Pi Zero, which changes colour depending on whether it’s time to get up or go to sleep."

    What has your experience been like with Raspberry Pi?

    I think there’s a lot more to come from Raspberry Pi. I have never been a computing teacher, yet I have used a Raspberry Pi and coding for every subject I’ve taught. There’s a lot to be said for their creative use – last year one of my graphics students made an interactive video player controlled by children’s toys to teach history – and to say that they can go from not knowing any code to that shows the ease of use of Raspberry Pi. I look forward to using them in my teaching for years to come.

  • RFID Gro Clock

    RFID Gro Clock

    Reading Time: 3 minutes

    The RFID Gro Clock is based around Raspberry Pi Zero W and has a custom-made 3D case. The project took about six weeks to complete and was finished just in time for Christmas.

    Man with a plan

    The aim of David’s RFID Gro Clock project was “to get my son to be more independent in going to bed and then also to stay in bed longer in the morning. From a purely selfish point of view, that would give me a bit more time in bed.”

    Interior of the RFID Gro Clock, showing Raspberry Pi Zero W and lighting all wired up

    To entice his three-year-old to go to bed in the first place, he decided to provide “some form of entertainment.” He also needed “a method to show somebody who cannot tell the time when it is OK to get up.”

    Story books that mentioned CDs piqued his son’s interest, so David decided this was a good option for the entertainment element. Using RFID as the control mechanism (for MP3s and other audio files) also made using the Gro Clock more intuitive: “I don’t like my children having lots of interactions with screens, so this is a great, physical way for kids to be able to control things.”

    Building blocks

    David based the project around Raspberry Pi Zero W for its GPIO programmability, memory, and microSD card support, as well as its compact size and low cost. He used Python to code everything and decided to use VLC Player for the MP3 playback “as this has a pretty well documented API and Python library, plus support for playing audio CDs.”

    David’s first Gro Clock, made for his now seven-year-old son, was installed inside a defunct remote-control car

    He added a ‘setcd’ command to identify the number of tracks on a CD when it was inserted and used events in his Python code to understand when the next or previous track was being played.

    He advises anyone planning a similar project to do their research and planning first. For example, he has no 3D printer so used a 3D printing website. Having created a design in FreeCAD (using YouTube videos as a guide) and sent the resulting STL file to print, David realised he’d omitted two, thankfully non-critical items – a potentially pricey mistake since 3D printing was already under way.

    “Raspberry Pi has been great for the project it allowed me to have the flexibility of a computer and all the software packages that are available, whilst also giving me the ability to interface with a wide variety of electronics components,” he reveals.

    Because he was using existing components as far as possible, not everything came together immediately. The RFID element caused a few issues with power consumption due to the Python package chosen, and because it and the OLED connect via SPI. Nonetheless, David recommends RFID cards as a method of control.”It’s a great way to allow little people to interface with devices,” he says. “Maybe when [my son] gets a bit older and more into music, I may look to have some RFID cards play Spotify songs.” 

  • SmartPi Touch Pro

    SmartPi Touch Pro

    Reading Time: 3 minutes

    All models mount the official 7-inch Raspberry Pi touchscreen and a Raspberry Pi of your choice into a single case running from one power supply. The result is a small, freestanding unit, perfect for kiosk-style applications. Add a keyboard and monitor for a small but perfectly formed workstation.

    The Touch Pro is a solid refinement of its predecessor. Although similar in appearance, the optional camera mount has been moved to the base of the screen, which gives it a slimmer profile. The internals have been redesigned to create more space: in fact, you can fit two HAT form-factor devices side-by-side. Cooling has been improved with a small optional fan mounted on rubber pillars to reduce vibration.

    This smart case makes a perfect control deck or mini workstation

    Construction was simple and completed in about 20 minutes thanks to a well-written online guide. It’s even easier than the previous models. Everything you need is included along with options for fan covers, a range of port blockers for both Raspberry Pi 3 and 4 configurations, ribbon cables for the display and camera, and – very neatly – a Y-adapter for both USB micro and USB C that now mounts inside the case to give a smart single connector to run both the device and screen. We also received the metal base accessory (sold separately) which gives the assembly a solid footing; your cat would struggle to topple this.

    Room for everything

    Multiple mounting options make this case suitable for both home and business applications

    Space is a common frustration in Raspberry Pi cases, and it is addressed head-on with the SmartiPi Touch Pro. There is a choice of two rear covers, one with 25mm clearance above the Raspberry Pi and a larger version with a whopping 45mm to play with. Even with the standard header, you can get a low-profile HAT mounted. If you can use jumper cables, you can even mount another HAT alongside. With the larger enclosure, even the larger HATs on the market won’t be constricted.

    Industrial applications have also been considered. A ‘stealth’ mode allows Raspberry Pi to be mounted fully inside, giving no easy access to the ports. And if wall or arm mounting would make for a cool touchscreen controller, the rear of the case features VESA mounting and eyelets for hanging from screws. If you want a custom base, additional hinges are provided that can be screwed on to your mount of choice.

    Smart design means lots of space for HATs and more

    We were impressed by the build quality, especially at the very reasonable price point. This SmartiPi Touch Pro has been carefully thought through and customer feedback considered. It’s a solid injection-moulded construction riddled with cut-outs so you can customise to your heart’s content. Access to the microSD card slot would be nice, but it’s blocked by the display ribbon cable. Nevertheless, if you’re looking for a kiosk or control-centre project, or even a highly portable computer (as we featured in The MagPi issue #98), the SmartPi Touch Pro is a great bit of kit.

  • #MonthOfMaking in The MagPi magazine issue #103

    #MonthOfMaking in The MagPi magazine issue #103

    Reading Time: 3 minutes

    Try out other ways of making with #MonthOfMaking

    For #MonthOfMaking, Rob has written an excellent guide on new ways of making. Newcomers will find fantastic ideas for things to make; experienced crafters will discover new techniques and technologies. This month, Rob looks into crafting, wearables, embroidery, soft circuits, upcycling, photography and more. Feature-packed with ideas for things to make.

    METAR Map

    METAR Map

    Our readers are a creative brunch and we loved Philip Rueker’s colour-coded weather map. METAR (meteorological aerodrome report) uses colour-coded LEDs to show the flying conditions at local airports.

    Raspberry Pi Amiga 600

    Raspberry Pi Amiga 600

    Amiga fans are finding the costs of their old computers skyrocketing. Once solution, explained by Billy Nesteroulis, is to build an Amiga 600 from scratch using Raspberry Pi 4 and a 3D printer. Raspberry Pi Amiga 600 uses a 3D-printed replica of an Amiga 600 case, while Raspberry Pi emulates AmigaOS to play games and software.   

    Physical computing Raspberry Pi Pico

    Easy Pico Projects and physical computing

    Raspberry Pi Pico continues to make waves in the maker community. Raspberry Pi’s new microcontroller is packed with potential. This month we’ve gathered together a wide range of add-ons, ideas, and projects in progress. Plus, learn how to use electronics with Raspberry Pi Pico in our “physical computing” tutorial. Join the Pico party.

    Make a digital do-not-disturb sign

    Make a digital do-not-disturb sign

    PJ has a great tutorial for us this month. Combining a Scroll pHAT and Keybow to create a digital do-not-disturb sign. One-touch of a button and it tells folks to stay out of a room. Perfect for when you’re in a video meeting or recording (or just want a bit of peace and quiet). Learn how it works this month.

    SmartiPi Touch Pro review

    SmartiPi Touch Pro

    We’ve taken to SmartiPi products over recent months. They use Raspberry Pi and the official touch screen to provide a neat all-in-one solution for freestanding projects. In this issue, you’ll find a review of the latest Touch Pro device. PJ tests out the slimmer design, better thermals and a repositioned camera placement and comes away impressed.

    Learn game development with Raspberry Pi

    Learn game development with Raspberry Pi

    Video games are a great way to discover computing techniques: combining fun with various coding techniques. Mark Vanstone has been writing about game development for The MagPi, and our sister magazine Wireframe and has put together this list of gaming assets. Discover the books, videos, courses, and resources you need to start making games with Raspberry Pi

    Pick up your copy of The MagPi magazine #103

    The MagPi magazine is available as a free digital download, or you can purchase a print edition from our Raspberry Pi Press store.

  • Win one of ten RFID HATs!

    Win one of ten RFID HATs!

    Reading Time: < 1 minute

    Subscribe

  • Raspberry Pi releases IQaudio products

    Raspberry Pi releases IQaudio products

    Reading Time: 2 minutes

    “This is the first time we’ve brought third-party products into our line-up like this,” says Roger Thornton, Principal Hardware Engineer at Raspberry Pi, on Raspberry Pi’s blog. “When the opportunity arose to acquire IQaudio’s brand and product line late last year, we jumped at it.”

     IQaudio DAC Pro. Priced at $25, DAC Pro is IQaudio’s highest-fidelity audio output HAT. It supports the same audio input formats and output connectors as DAC+, but uses a Texas Instruments PCM5242 DAC, providing an even higher signal-to-noise ratio

    The change means IQaudio products are listed on Raspberry Pi’s products page and are available from Raspberry Pi resellers, where they maintain the IQaudio brand.

    IQaudio was founded in 2015 by Gordon and Sharon Garrity together with Andrew Rankin. It was “one of the first companies to recognise the potential of Raspberry Pi as a platform for hi-fi audio,” adds Roger.

     IQaudio Codec Zero. Codec Zero is a $20 audio I/O HAT, designed to fit within the Raspberry Pi Zero footprint. It is built around a Dialog Semiconductor DA7212 codec and supports a range of input and output devices, from the built-in MEMS microphone to external mono electret microphones and 1.2W, 8 ohm mono speakers

    Hi-fi audio is a new market for Raspberry Pi. “We’ve never felt we had the capabilities needed to offer something distinctive,” says Roger, “leaving third parties to step in with a variety of audio I/O devices.

    “IQaudio products are widely used by hobbyists and businesses, with in-store audio streaming being a particularly popular use case).”

     IQaudio DigiAMP+. Whereas DAC+ and DAC Pro are designed to be used with an external amplifier, DigiAMP+ integrates a Texas Instruments TAS5756M digital-input amplifier directly onto the HAT, allowing you to drive a pair of passive speakers at up to 35W per channel. Combined with a Raspberry Pi board, it’s a complete hi-fi the size of a deck of cards

    The four most popular IQaudio products for Raspberry Pi – DAC+, DAC Pro, DigiAMP+, and Codec Zero – are all available to buy via Raspberry Pi Approved Resellers.

  • WeCount Traffic Sensors

    WeCount Traffic Sensors

    Reading Time: 3 minutes

    Rather than have someone stand on the pavement and count manually, however, planners use technology. Some expensive solutions are limited to a narrow set of locations such as highways but, in the case of the WeCount project, an affordable solution has been found with the help of Raspberry Pi.

    WeCount invites members of the public to place a sensor in their homes, peering out of the window, allowing live traffic maps of neighbourhoods to be built. Engineering and emissions expert Kris Vanherle says involving citizens results in greater support for future traffic management implementation. “Data collection also becomes more affordable for local authorities and citizens can even help interpret the data,” he adds.

    In one instance, a spike in traffic was due to a temporary road block and this was reported by one of the citizens involved. WeCount is now being used in six European cities – Madrid, Barcelona, Dublin, Cardiff, Ljubljana, and Leuven – and the data collected is uploaded to the cloud so that it can be used within initiatives related to air pollution, safety, active travel, noise, and speed.

    Creating the sensors

    The sensors were originally built using Raspberry Pi 3B+ computers, but the production units make use of Raspberry Pi 3A+. “These already provide the required processing power and memory and we found we did not need the extra ports of its big brother after the initial development phase,” explains Dr Péter I. Pápics, a researcher at Transport & Mobility Leuven.

     A Raspberry Pi 3A+ is fitted inside each case and connected to the WiFi within each volunteer resident’s home

    He says the project uses standard Python libraries combined with OpenCV for the image processing and object tracking algorithms. “We need to maintain the necessary frame rate, which is around 30fps, to capture even the fastest cars over at least a few frames,” he continues.

    “So we are using the most simple background extraction and contour detection methods to find moving objects on each frame and then a tracking algorithm to identify and track them over their visibility period stretching across a set of consecutive frames.”

    A Raspberry Pi operates as a wireless hotspot and it provides a simple user interface so that camera angles can be fine-tuned. “After ten minutes, the hotspot mode is automatically disabled and Raspberry Pi attempts to connect to the local WiFi,” says Péter.

    “If successful, the actual traffic monitoring script is activated and various properties of the detected objects are periodically transmitted to our services where data processing, classification, and aggregation services produce the data that’s available on our website or via the public API.”

    Amassing the data

    The cities involved are enthusiastic. Prof Enda Hayes, from the University of the West of England in Bristol, says he was keen to include Cardiff because it has immeasurable potential for more active travel. “The city’s inhabitants are very car dependent and the city experiences a large influx of daily commuters with the majority of these journeys – some 80 percent – by car,” he says.

    Kris Vanherle and colleague Giovanni Maccani work on the production of a sensor device which is housed inside an expensive casing made by TEKO

    The sensor also allows for the counting of pedestrians and cyclists. “I delivered one to a volunteer who lived on a dead-end street and found out pedestrians and cyclists were using the street as an active travel rat-run to get to a local train station. He wanted to convert the street into a Low Traffic Neighbourhood.”

    Kris says the data also allows researchers to observe how traffic behaves if lanes are closed on adjacent streets and it’s been used to increase compliance to speed limits. “WeCount empowers citizens and anyone who wants to join can do because the platform is open,” he says. 

  • We still fax

    We still fax

    Reading Time: 3 minutes

    “Imagine immersive theatre crossed with an escape room, but in your home – and that’s We Still Fax!” Paul Hernes Barnes of the ANTS explains. “We wanted to make a real, live theatre show that was offline and tactile. We Still Fax is our solution; it’s a whole new form of theatre!”

    People taking part receive a special fax machine in the post – hence the name of the show – which they interact with as it ‘comes alive’ during the performance. It uses sound, light, touch, smell, smoke, and faxes throughout.

    As the ANTS describe it: “You receive a mysterious machine in the post. You plug it in and something strange happens… You connect with an alternate dimension; one in which the internet doesn’t exist and someone needs your help! To take on this incredibly important mission, you will need to crack codes, send faxes, unlock secret hatches and, when the time comes, push the big, red button. They are counting on you; their world depends on it.”

    Indistinguishable from magic

    Unfortunately, we have to break the illusion of the show by revealing that this interdimensional device is in fact a modified fax machine that uses a Raspberry Pi, among other things.

    Designing and testing has been going on throughout 2020

    “The core components of the show are the triad Fax Machine, Grandstream, and Raspberry Pi,” the ANTS tell us. “In short, the Grandstream is an ATA (analogue telephone adapter) which translates phone signal into ethernet signal and vice versa.”

    Audience members use the machine to make phone calls and send faxes, which are interpreted by Raspberry Pi to activate effects.

    “Apart from these three, we have an LED strip which is controlled through GPIOs,” the team continue. “From these we also control the Microfogger 2: a micro smoke machine. Finally, sound comes through speakers which are, again, connected to Raspberry Pi.”

    When it comes to software, all the distribution and management of calls, sounds, lights and smoke is done in a Python script that’s constantly running in the background. “We use Asterisk, an open-source communication software, to interpret calls. Asterisk provides an in-built database, which we use to communicate between Asterisk and Python.”

    Must go on

    Performances have been going on, with varying success. “As you can imagine, the technical components of We Still Fax are complex and there have been a fair few issues to overcome!” the ANTS reveal. “While incredibly well-received, the initial research and development performances were patchy in terms of reliability – from the ‘perfect’ performance to one in which we had to abandon the machine for an internet version, there were a lot of learnings!”

     The escape room inspiration is a great way to make this performance work at home

    These sharings were crucial trials that enabled them to understand how different users would play differently – and what that would mean for the programming. “Operating the tech remotely was a significant challenge and we have developed a ‘rescue’ button that will both reboot the machine and re-send us access to Raspberry Pi via email.”

    They also uncovered a flaw in the overall box design: “During one show, a plug located inside the casing of the fax machine fell out! We have now refined the code, design, aesthetic, timing and theatrics, as well as planted Easter eggs throughout the player’s journey! The content, design and code are now in a good place to begin our first string of commercial performances – we can’t wait!”

  • Turing Machine Demonstrator Mark 2 (TMD-2)

    Turing Machine Demonstrator Mark 2 (TMD-2)

    Reading Time: 3 minutes

    Ontario-based Michael Gardi is one such maker who has now created two versions of his Turing Machine Demonstrator (TMD). Acknowledging that there are some other great implementations out there, he wanted to maintain a focus on the real purpose of a Turing machine. “In my humble opinion, the complexity of these excellent and imaginative solutions often detracted from the understanding of what a Turing machine actually does,” he tells us. “For TMD-1, my goal was to demonstrate the idea of a Turing machine with as much clarity as possible. I wanted to build a machine that was simple to program and easy to understand. I was really happy with the way that TMD-1 turned out. I believe it met the stated goals of ‘simple to program’ and ‘easy to understand’. To help accomplish those goals, the machine itself was limited to three states / three symbols, and a small ten-cell bounded tape.”

    The next level

    With the first version under his belt, Michael then decided to create a version with more potential depth for the Turing machine enthusiast, and TMD-2 was born. “For TMD-2 I wanted to ‘up the ante’,” he says. “My goal was to make a six-state / six-symbol machine with a large 100,000 cell tape. As much as possible, I tried to bring forward the simple-to-use, easy-to-understand principles from TMD-1.”

    Mounted onto the back of the State Transition Table box, the articulated camera arm is a design by Chris Rogers

    His TMD-2 makes use of a Raspberry Pi 3, an Official 7-inch Touch Display for the user interface, and a Camera Module mounted on an articulated arm above a ‘State Transition Table’ box. The latter can hold one of a selection of table cards 3D-printed by Michael, along with a set of alphanumerical tiles to place on them. The camera scans the current state of the machine, which is read using the Tesseract OCR (optical character recognition) library. The resulting computations are then shown on the Touch Display.

    Python program

    “At its heart, TMD-2 is a standalone program written in Python,” says Michael. “If you just want to try the application, it will run on any computer that supports Python (which is most machines). Running it on a Raspberry Pi is extremely easy, since both Python and the Pygame library it relies on are already part of the Raspbian [now Raspberry Pi OS] distribution.”

    The computations are shown on screen, with the ‘tape’ at the top moving left and right to read and write zeroes and ones, as determined by the table of instructions

    While Michael has had some great feedback on TMD-2 following his posts on Hackaday, Hackster, and Instructables, he says, “Unfortunately, with the Covid-19 restrictions here I have not been able to show these projects to friends at my local makerspace which is where I would normally get the best feedback (both good and bad!). My son and daughter-in-law worked through the Quick Start Guide for TMD-2 and ‘programmed’ some of the challenge exercises. They are both avid gamers and said that it was a lot of fun, ‘like a game’.”

    His TMD-2 is a truly fascinating make based on a seminal invention that, arguably, laid a solid foundation for development of the computers that we use today. What could be more inspiring?

  • 10 Amazing: Day-to-day life projects

    10 Amazing: Day-to-day life projects

    Reading Time: 3 minutes

    LunzPi

    Radio alarm clock
    magpi.cc/lunzpi

    Lunz Pi

    This retro-looking alarm clock is anything but – it uses a Spotify playlist and can control some lightbulbs as well. Make sure Sonny & Cher are on the playlist, though.

    LED Light Sunrise Clock

    Don’t be SAD
    magpi.cc/sunriseclock

    LED Light Sunrise Clock

    Waking with the sun has some science behind it that experts say means you wake up better. Or something. Test out the theory on yourself with this cool project.

    BOSEBerry Pi

    Internet radio circa 2011
    magpi.cc/boseberrypi

    BOSEberry

    We recently featured this upcycling build in the magazine, where David Hunt took a decade old iPod dock, gutted it, and installed a Raspberry Pi in there for a cleaner-looking, customisable, internet radio.

    RadioGlobe

    International radio locator
    magpi.cc/radioglobe

    Radio Globe

    One of our favourite projects from 2020, this toy globe has been heavily modified so that a Raspberry Pi knows where a reticule is pointing anywhere in the world and will play radio from that location. It’s very cool.

    MagicMirror

    Fair and informed
    magicmirror.builders

    Magic Mirror

    Make sure you look good and know what’s up today with this excellent AR project that is almost a rite of passage for many Raspberry Pi makers.

    DAKboard

    Info screen
    magpi.cc/dakboard

    DAK board

    Don’t quite want something as large as a magic mirror, but love the idea of a smart info board in your home? Try out the DAKboard idea – you can even make it look like a picture or small window.

    Raspberry Pi Bus Schedule

    Be on time
    magpi.cc/bussched

    Raspberry Pi bus schedule

    Missing the bus can be a royal pain. Creating your own little info screen with the bus schedule for your local stop is a great way to make sure you don’t unnecessarily leg it out the door in the morning.

    Smart coffee machine

    Morning brown dispenser
    magpi.cc/smartcoffee

    Smart coffee machine

    There’s a ritual to making (fancy) coffee that some folks love. Other folks just need a hit of caffeine in the morning to get themselves going. This makes it easier and quicker to get a nice cup of coffee to help wake up.

    PiHue

    Automated lights
    magpi.cc/pihue

    Pihue

    Controlling your lights is a classic home automation task, and this project allows you to control one of the mass-produced smart light-bulb standards using a Raspberry Pi.

    Touchscreen thermostat

    Automated heating
    magpi.cc/thermostat

    Touchscreen thermostat

    Automatically adjusting the heating in your home using smart devices and very precise rules can be easily achieved using a bit of a hack with a Raspberry Pi.

  • RT Jam

    RT Jam

    Reading Time: 3 minutes

    “I was familiar with Voice over IP (VoIP) from previous experience and decided to try to build something with latency low enough to allow you to play as a group online,” says Mike.  “When I saw that Raspberry Pi OS was just another Debian distro, I realised my laptop Linux code would compile and run on the Pi.”

    Low latency

    To work properly, RT Jam would need a person-to-person latency of less than 25 milliseconds. “I was leery of a peer-to-peer product because of the many issues with network firewalls, so I decided to opt for a client/server type structure,” Mike explains. However, “large variances” in sound, the input-output performance on Linux, Windows, and macOS made a software-only solution “very troublesome”, he says. “Raspberry Pi gave me a turnkey solution.”

    Mike’s setup uses the Linux-based Ardour Mixer MIDI app

    Mike realised his 4GB Raspberry Pi 4 could be also used to run the broadcast server, including NGINX, and applauds the ability to install so many standard packages so easily. “Compiling the code on Raspberry Pi was very straightforward.”

    Sound and vision

    Before he began working on RT Jam – he describes the “want level” as a silver lining born of necessity – Mike had tried out Raspberry Pi for a putative HearSee project (also on GitHub) in which ultrasonic range sensors on a handheld stick convert distance readings into a sound form that would allow you to ‘see’ with your ears. That project is on hold, but it acted as an excellent demonstration of Raspberry Pi sensors’ capabilities. “Raspberry Pi worked great for hooking up the sensors and creating the sound,” he says. However, low-latency audio would work with Raspberry Pi only when using a USB 2.0 device for both input and output. He chose a FocusRite Scarlett controller, which he loves for its aesthetics as well as its performance.

    RT Jam is powered by Raspberry Pi 4, while mixing controls are accessed via a touchscreen

    Mike began by using DISTRHO/DPF, a software framework for audio plug-ins, using which he was able to program all the audio I/O via jack. He had help from falkTX who had been working on this framework for some time.

    The design for the VoIP elements was Mike’s own. “I have done this kind of stuff before, so it was not too hard,” he says, “but I had not written any C++ code for 20 years, so I was a bit rusty. I’m sure if somebody looks at the code (it’s open-sourced), they will find lots of things to laugh at!”

    „Once Mike realised that Raspberry Pi OS was simply a Debian distro, things slotted into place and RT Jam began to take shape.“

    One of the challenges was to get Raspberry Pi’s touchscreen working right and to figure out the settings for real-time audio. Once he was happy with everything, Mike simply copied it all as a microSD image.

    He’s keen to develop RT Jam, adding capacity for more musicians to jam along. “I also want to hook up an Icecast feed from the server so even people who don’t have the software can just listen to a live broadcast of the room feed.”

  • Review: RFID HAT

    Review: RFID HAT

    Reading Time: 2 minutes

    The RFID HAT (£25 / $34) from SB Components comes with an RFID Module reader and two RFID tags (a plastic card and a key fob). On the HAT is also a small 0.91-inch OLED display, buzzer, and LEDs for power and card detection. There is also a GPIO extension header, enabling you to hook up the RFID HAT components to further items.

    The HAT (Hardware Attached on Top) runs a UART (Universal Asynchronous Receiver/Transmitter) in the 125GHz frequency range. You can pick up extra RFID tags, cards, and stickers for very little cost. Each RFID tag contains a unique identification number, which is detected when the tag is placed next to the RFID reader on the HAT.

    RFID projects

    We’ve seen many Raspberry Pi projects make great use of RFID technology. Perhaps the most famous is Museum in a Box. This project enables people to pick up objects and tap them to a Raspberry Pi-controlled speaker and hear an audio response. We’ve also seen a few projects that play Spotify albums when a model of the physical media is brought next to the RFID reader. In addition, you can use RFID for more standard projects such as ID badging, access control, and tracking of items.

    SB Components’ RFID HAT connects neatly on top of a Raspberry Pi Model B

    Thanks to HAT technology, the installation is taking care of with the built-in EEPROM. You need to activate I2C and Serial Interface in Raspberry Pi OS, but it took all of five minutes to get everything up and running. There are some instructions in the store page, but we found it clearer to follow the instructions on the GitHub page.

    „We’ve seen many Raspberry Pi projects make great use of RFID technology.“

    Once set up there are three sample scripts: one which displays the RFID ID on the command line, one which displays it on the OLED screen and rings the buzzer, and a third that displays the LED on the board when an RFID tag is detected.

    We couldn’t find API documentation, but reading the sample scripts was easy enough. Still, we would prefer to see more detail in the documentation. We had fun playing around with the RFID HAT and think it’d be a great way to implement RFID technology into your Raspberry Pi project.

    Verdict

    8/10

    A fantastic HAT with good-quality components, and the OLED display is a nice touch. The documentation could be better, but we found everything easy to set up and understand.