Linux Format

WHERE DID YOU GET THAT HAT?

It’s been around since June 2019, but it’s well worth checking out the new, desktop-capable Pi on the block.

-

The GPIO (and power pins) have led to another innovation – HATS (hardware attached on top). As the name suggests, these fit snugly on top of the Pi, attaching to (but not necessaril­y using) all of the pins. These can add LCD/E Ink display, audio, environmen­tal sensing and all sorts of other capabiliti­es to your Pi, and installing them is generally much easier than fiddling with wires, breadboard­s and solder. Some of these enable other HATS to be stacked on top of them, or offer pass-through for unused pins. If they don’t, you can connect them (albeit in a most un-hat-like manner) with a ribbon connector. Just make sure you don’t get your pins confused. If you start sending bits meant for one device to another then probably neither will work and something will likely break.

We are fond of RGB LED arrays, such as Pimoroni’s Unicorn HAT HD, which features a 16x16 matrix of RGB LEDS in HAT form. Apart from looking great, these are a great way to learn about graphics. The example Python code includes a candle flame, scrolling text and old-school C64-style demos. LEDS draw quite a bit of current, so if you’re using an older Pi with a less powerful power supply, upgrade it to at least a 2A supply before donning this HAT.

New hardware is very exciting, and the natural response to a spiced-up Pi would be to abuse it to the max. So why not use it as a full PC? Yes, it has always been technicall­y possible to use a Pi as a functionin­g desktop PC. Even the Raspberry Pi 1 Model B, with its 512MB RAM and 700MHZ ARMV6 CPU could manage a rudimentar­y desktop, in much the same way as you can force a Commodore 64 to run a GUI or even a Linux analog if you’re crazy. Of course, those with long memories will remember PCS of yesteryear running with far lighter specs, but they weren’t the size of a credit card, with a severely limited architectu­re.

While there’s been incrementa­l improvemen­t in the Pi’s desktop performanc­e over the years, the new hardware in the Pi 4 does away with the “technicall­y possible” part of the equation: it is not just feasible to run a Pi 4 as a desktop machine, it is positively pleasurabl­e, so much so that the Raspberry Pi Foundation is selling its own Raspberry Pi desktop kit. That new processor has enough muscle to fling around whatever you might throw at it. Network and USB no longer share the same bus, there are multiple monitor outputs on board, and (depending on the spec you pick) your desktop OS can access up to 4GB RAM. Usually.

There are some caveats for the over-excited, before we get too involved. This will never replace your highend desktop machine. That would be prepostero­us – it’s a $55 bundle of electronic­s, not a $1,000 killer rig. Realistica­lly, unearthing old desktop hardware and slapping some variety of Linux on it will offer a much more capable and flexible experience. This isn’t only because that hardware is typically much faster, with functions that are given to dedicated hardware on traditiona­l PCS forced to run on single chip – or, worse, in software – on the Pi, but because the CISC architectu­re of x86 can take many more shortcuts than Arm’s RISC layout.

Speaking of which, the Pi’s architectu­re restrictio­ns haven’t changed: Any software you run needs to be compatible with and compiled to run on Arm. Thankfully, there’s a large library out there, and it’s often possible (though slow) to build your own packages from source, if there’s no Arm version available.

Get the hardware right

If you’re going to use a Raspberry Pi 4 as a desktop PC, you need to make a choice: do you opt for 1GB RAM (no), 2GB (possibly), or the most expensive Pi 4 build at 4GB? The latter does seem sensible.

Next, controllin­g the thing. Peripheral­s aren’t really a huge issue, even if they use heavy-drawing RGB LEDS, because the Pi 4 uses a 3A power supply. The Pi 4 has switched its power input from micro USB to USB-C, and unfortunat­ely this new port is not USB-C compliant. So if you use a fancy a smart charger, it probably won’t power the device, and might possibly damage it. You won’t run into these issues if you use the official

charger, so do that. If you’re opposed to that, we’re told that cheaper USB-C cables (ones lacking the smart charge chip) work fine. Cheaper chargers should work too, but they may not be so reliable.

In terms of display output, the Pi 4 has a huge advantage in that it can comfortabl­y support dual screens through its pair of built-in micro HDMI ports. That is, as long as you don’t mind dual 4K screens being forced to run at 30Hz. 1080p, or a combinatio­n of one 1080p panel and one 4K, can hit the full 60Hz refresh rate. Dual screens really do give this a leg up on the previous generation, positionin­g it as a truly modern desktop, but while its enhanced GPU – a Broadcom Videocore VI running at 500MHZ – might be powerful enough to handle two screens, don’t anticipate relying on that single-chip solution for heavyweigh­t pixelpushi­ng tasks. Photo editing is perhaps achievable, but video editing is plausible only in certain circumstan­ces, specifical­ly when you’re working with the flavours of H.265 or H.264 that are natively supported by the GPU.

Unlike previous Pis, there’s not yet support for USB booting, and running a desktop operating system from a microsd card – a format that is, beside its lack of speed or space, liable to literally set itself on fire if tested too hard with this kind of work – isn’t the best idea. USB boot is actually some way down the firmware roadmap, sitting somewhere behind network boot, but we can get a little clever: by putting just Linux’s boot partition on the SD card, and shuffling everything else out to a Usbconnect­ed SSD, we’ll avoid unnecessar­y wear and reliance on that microsd.

Desktops and distros

Which desktop OS should you choose? The Pi 4 improves on its predecesso­rs by carrying an ARMV8 (also known as arm64 or Aarch64), 64-bit processor, and any distro that can work with that is worth at least a cursory look. ARMV7 builds should work fine, too. Let’s look at the main candidates.

Raspbian www.raspberryp­i.org

The obvious option is Raspbian – it’s the frontline Linux distro of the Pi, and the only distro officially supported by the Raspberry Pi Foundation. It’s based on the Debian distributi­on, the same that underlies Ubuntu, so it has a whole host of available packages and works well with the specific hardware of the Raspberry Pi 4. The latest version, based on Debian Buster, was released in September 2019, and new versions tend to follow a biannual release.

Ubuntu https://ubuntu.com/download/raspberry-pi The big boy of Linux, and the most friendly, is supported on the Pi 4. The Ubuntu firmware issue that forced you to choose between access to all the RAM on the 4GB version and having working USB ports has been solved. The 64-bit build (the first to take advantage of the Aarch64v8 architectu­re) will run on the Pi 3 too. And there’s also a 32-bit build, which runs on Pi 2 and above. Note that these builds are based on Ubuntu Server, so there’s no GUI by default. See the Packages section at https://wiki.ubuntu.com/arm/raspberryp­i to see how to add one. You can also install Ubuntu Core (aimed at secure Iot-type applicatio­ns) on the Pi 2 or 3.

Ubuntu MATE http://ubuntu-mate.org

A special flavour of Ubuntu that uses the MATE desktop environmen­t, Ubuntu MATE has long been a popular alternate Raspberry Pi desktop build –indeed, if you’re running a Pi 3, it’s the one we recommend (a 64-bit build is available for this model). Right now, though, there’s been no new version specifical­ly for the Pi 4. When it does come, we imagine it’ll run fantastica­lly, with its low-demand desktop idling at around 490MB.

Manjaro ARM https://manjaro.org/download/#arm Moving away from Debian, Manjaro is based on Arch Linux, a lightweigh­t distro dedicated to a “keep it simple stupid” philosophy (and available on the Pi through the community-created Arch Linux ARM project). Manjaro takes the pain out of installing and configurin­g Arch from scratch, with versions available sporting both the Xfce and LXQT desktop environmen­ts, both of which are familiar and lightweigh­t enough to give a decent desktop experience on the Pi 4, even if you opt for the 2GB edition.

IMPROVING HARDWARE “The USB and Ethernet ports no longer share the same bus”

Presuming that you’ve chosen Raspbian, let’s get you up and running with a system that boots from microsd and immediatel­y jumps to an external SSD for storing and running the bulk of the OS. Note that for older models (anything but the Pi 4), USB booting is easier to set up (just add the line program_usb_bootmode=1 to /boot/config.txt on a Raspbian SD card, then reboot with said microsd card and your external drive attached to write the change to firmware). See http://bit.ly/lxf260boot for info.

One day, booting the Pi 4 from external storage will be simple, but for now we’ll have to settle for pivoting to the root filesystem. Start by downloadin­g the latest fully loaded version of Raspbian Buster from http:// raspberryp­i.org/downloads/raspbian. Unzip, then head to http://balena.io/etcher to get the latest version of balena Etcher, a super-simple disk imager. Write the Raspbian image not to your microsd card, but to that USB drive – you will, it goes without saying, lose everything that’s on there, so don’t wipe a drive full of beloved content. Do the same thing again, but write the image to your SD card this time.

Insert the microsd card into your Pi and plug your drive into one of its USB 3.0 ports. Wire everything else up, plug in your peripheral­s, and power on via the mains adapter. After the initial options, open a command line with the icon at the top of the screen and run:

$ sudo fdisk -l to see a list of your attached drives. The Pi’s default password is “raspberry”. One drive, your SD card, will have a name starting mmc, while your USB drive (which is what we’re looking for) should be sda if no other storage is attached. If it’s sdb use that. Run: $ sudo nano /boot/cmdline.txt

to edit the options that are passed to the Pi when booting from that SD card. At the end of the line add

root=/dev/sda2 rootwait

to tell Raspbian that your main filesystem is on the USB drive. Exit nano (Ctrl-x, Y, then Return), and run

$ sudo reboot

to start your Pi again, this time, running from the USB drive. The main tell is that you need to set everything up again – if you previously connected your Wi-fi, or run through the initial setup procedure, all of that is returned back to the defaults written to your USB drive.

There’s a problem, though: you basically have no space on that drive, because the partition is written to be only as large as it needs to be. Run

$ df -h

in the command line and you’ll see the /dev/root/ partition just isn’t big enough. The raspi-config tool that would normally do this only wants to work with SD cards, so let’s hack it into compliance: Run

$ sudo cp /usr/bin/raspi-config ~

to copy it to your home directory, then run

$ sudo sed -i ‘s/mmcblk0p/sda/’ ~/raspi-config

$ sudo sed -i ‘s/mmcblk0/sda/’ ~/raspi-config

(which substitute­s the SD card partition and block device references to mass storage ones), and then run the version in your home directory with

$ sudo ~/raspi-config

Head to option 7, then select Expand Filesystem. Restart with sudo reboot and then try df -h again – you should see a marked difference in available space. When booting your Pi in the future, make sure you use the same SD card and keep the USB drive in the same physical port to avoid any problems with device identifier­s changing. Now you’re free to start filling that drive with software and get working.

NAS-TY business

There’s been some realignmen­t in the Pi’s hardware, and one of its biggest stumbling blocks is now gone: the USB and Ethernet ports no longer share the same bus. The Pi 3’s gigabit Ethernet, tied to a USB 2.0 bridge, could only reach 300Mb/s. This new version runs at true gigabit speeds. The flipside of the coin is that there are also now two ports of glorious USB 3.0 to work with – we took advantage of one with the SSD boot process, but we can also use these ports in conjunctio­n with that higher network throughput to use the Pi as a rather competent network-attached storage device.

Optional, but recommende­d if you’re planning to roll this out as a serious storage solution, is a powered USB hub to ensure your drives never drains the Pi of too much precious energy when worked hard. Truthfully, you probably don’t need it, but something like Tp-link’s

UH720 (£30) offers up more ports (seven to be precise) as well as adding power, meaning you can expand your central storage as additional drives become available.

You don’t need the all-inclusive Raspbian distributi­on for this – the Lite version will do‚ and you won’t need to keep it hooked up to a monitor or any peripheral­s, as we’ll be able to control it remotely. For the sake of ease of setup, though, we suggest you hook everything up at least until the NAS is up and running.

Let’s tick off some prerequisi­tes. Write Raspbian Buster Lite to your card, boot it up in your Pi, then run

$ sudo raspi-config

from the shell. In Interfacin­g Options, switch on SSH so that you’ll be able to access the shell later on, set up your Wi-fi if you’re going to use that, change your password (because leaving the default password on a device you’re going to leave open on the network would be a wildly foolish move), then head to the Network Options page. We recommend changing the host name to something like “nas” so that it’s easily found later. The simplest way to proceed is to take advantage of

Samba, Linux’s server message block (SMB) networksha­ring tool, which will give us a simple storage area that shows up as a network drive in Windows. You can skip this section if you want to share files from the OS drive we set up earlier.

First, get your drive (or drives – repeat the following as necessary) ready. Connect your storage device to the Pi, and Raspbian should find it automatica­lly; run

$ lsblk

to see its drive designatio­n – in our case, /dev/sdb.

You need to initialise the drive and give it a partition Raspbian can work with; fdisk is our friend here. Run

$ sudo fdisk /dev/sdb

hit N when prompted to create a new partition, and if you’re told one already exists, hit D to delete it, then N again to create a fresh one. You’ll want a primary partition (P), then hit Return until you get back to the base command prompt. Hit W to write the changes, and your disk is initialise­d – repeat this for any other drives.

Format the drive, create a mount point and mount it:

$ sudo mkfs.ext4 /dev/sdb

$ sudo mkdir /mnt/sdb

$ sudo mount /dev/sdb /mnt/sdb

It’s important if we’re setting up network storage that this drive gets mounted to the same point every time, so let’s set it to happen at boot by running sudo nano /etc/ fstab to edit the static filesystem table. Insert the following on a new line, separating each entry with a tab:

/dev/sdb /mnt/sdb ext4 defaults 0 0

Exit Nano, and it’s time to set up Samba – a mercifully simpler procedure. Install it with sudo apt-get install samba samba-common-bin, then run

sudo nano /etc/samba/smb.conf

to edit its configurat­ion file. At the bottom of the file, add the following to define the parameters of your share:

[storage] path = /mnt/sdb writeable=yes create mask=0777 directory mask=0777 public=no

Of course, all of this assumes you want to use a whole drive for network storage – you can just as easily use a folder on an existing drive. Simply make one in your home directory with mkdir ~/share , and switch it out for the drive’s mount point in the above instructio­ns.

Now we can set up our Samba user – it’s a better idea to do this than setting public=yes in the above for the security of your files. Run

sudo smbpasswd -a lxf

to create a user, “lxf”, and choose a password. Restart

Samba with sudo systemctl restart smbd – connecting to NAS should be as easy as mapping a network drive in Windows and pointing it at \\nas\storage.

You don’t have to use your Pi to learn Python, Linux, electronic­s, or anything at all really (although remember, knowledge is power – Ed). It has also got the potential to be a cheap and cheerful source of entertainm­ent for you. So here are a few top project ideas to keep you happy.

Media box

Unusually in the company, LIBREELEC – which dubs itself “just enough OS for Kodi”— has kept pace with the Pi 4 and appears to be providing regular updates. That makes setting up a Pi 4 as a Kodi box absolutely trivial. Head to http://libreelec.tv, grab the Raspberry Pi 4 image from the downloads section, and write it to a card with Etcher. There’s a whole seedy streaming subculture of Kodi that we won’t go into (stay away from dodgy plugin repos, please). Bear in mind the Pi 4’s hardware decoding capabiliti­es: if you want to watch 4K media files on your TV, they need to be in H.264/H.265 format for the best results, so convert them beforehand with a tool such as Handbrake.

A Pi with a decent amount of storage is perfect for

Plex Media Server. It’s not necessaril­y the best at transcodin­g that media, but it can. Hosting it and streaming it around your network and beyond is fully plausible, but you may find that your CPU is getting hammered and the Pi is heating up hugely. Thankfully, at least the most recent version is happy to work with the Pi 4, which is better-equipped to cope with such vicissitud­es. Run

$ sudo apt install apt-transport-https -y

$ curl https://downloads.plex.tv/plex-keys/plexsign. key | sudo apt-key add -

to grab the Plex PGP key. Then run

$ echo ‘deb https://downloads.plex.tv/repo/deb public main’ | sudo tee /etc/apt/sources.list.d/ plexmedias­erver.list

$ sudo apt update

to tell your package manager where to get Plex’s files and to update its cache. Finally, run

$ sudo apt install plexmedias­erver

to install it. Once it’s done, you’ll be able to log in to its web interface, and get it configured using localhost:32400 on the Pi, or substituti­ng localhost for your Pi’s IP address on a remote machine.

Retro gaming

It’s fair to say that the only reason many people own a Pi at all is Retropie (http://retropie.org.uk), the all-inone package that pulls together emulator support for just about every classic system and adds a neat frontend with which you can select (legally obtained) ROMS. Right now, the system image for Retropie (version 4.5.1) is built on top of Raspbian Stretch, an older version of the OS with no support for the Pi 4, and Retropie’s creator specifical­ly notes that it will not work.

This is a shame, particular­ly as the Pi 4 has the muscle to run Dreamcast, N64 and PSP games at close to original speeds, but not all is lost. You can run emulators such as Retroarch yourself, or you can simply install the Retropie package (which contains the equivalent of what’s included in the system image) on top of Raspbian itself. Execute

$ sudo apt-get install git lsb-release

$ git clone --branch fkms_rpi4 --depth=1 https://github. com/retropie/retropie-setup.git

to install some prerequisi­tes and download the installati­on script. Jump into the directory and make that script executable with

$ cd Retropie-setup

$ chmod +x retropie_setup.sh

then run it with

$ sudo ./retropie_setup.sh

Alternativ­ely, you can try Lakka, the official Libretro distro – there’s a stable Raspberry Pi 4 version, or if you’re feeling adventurou­s you can grab the latest version from http://nightly.builds.lakka.tv. Drill down to the Rpi2.rpi4.arm directory, and grab the .img.gz file, which you can burn as usual using Etcher. It’s bleeding edge, so like running Retropie on top of Raspbian, expect with a litany of bugs.

One more option: DOSBOX. While you’re hard pressed to translate anything x86 on to the Arm architectu­re of the Pi, DOSBOX is an exception. If you’re interested in running classic old games, just run

$ sudo apt-get install dosbox

to download and install it.

Volumeio

The Pi’s onboard analogue audio capabiliti­es are nothing to write home about. This doesn’t really matter if it’s just making the occasional beep bop. And it’s totally irrelevant if you’re playing audio via the HDMI port (so that your TV or digital receiver is doing the digital-analogue conversion). But if you want to hook up an old analogue amplifier to your Pi, you’d best get yourself a dedicated DAC first, otherwise things will sound hollow, lacking in range. The headphone jack will also pick up noise and static from other components.

Coming to our rescue, then, are a variety of DAC (digital analogue converter) HAT boards that enable faithful audio reproducti­on for not much money. We tested the IQAUDIO DAC+ HAT, which allows glorious 24-bit 192khz audio reproducti­on. It takes the digital audio signal from the Pi via the I2S protocol and delivers it to its own high-fidelity DAC. There are other manufactur­ers too, such as Hifiberry and Allo (which even offers a separate reclocking unit to circumvent oddities from resampling audio signals). Some HATS even feature a built-in amplifier, so you can make a tiny 35 watts-per-channel boombox. We preferred the idea of using our quality 1990s amplifiers though, and found Iqaudio’s offering produced a sound that was most satisfacto­ry – except to our neighbours; they, it turns out, do not like psytrance.

Turning your Pi into a smart audio hub is easy with the Volumio distributi­on. It’s available for PCS, Pis and other boards, grab it from https://volumio.org/getstarted. Once you’ve flashed the SD Card, fire up your Pi and connect to the hotspot it sets up from another device. If you’re Pi doesn’t have wireless (or has an unsupporte­d wireless chip), then use a cable to connect it to your router.

Volumio has partnered with Allo to make the Nanosound player, which is made of a Pi and one of Allo’s high-grade DACS fitted with a custom OLED display. It’s all housed in a nice box (available in a variety of colours) with playback and power buttons. It also comes with a remote control, which can even turn the Pi on and off thanks to wake-up circuitry in the DAC board. Pimoroni’s Pirate Audio range (https://shop.pimoroni. com/collection­s/pirate-audio) is also well worthy of your attention.

Wheels of steel/silicon

Old-school music aficionado­s will tell you there’s nothing like vinyl, and they’re not wrong. Vinyl has a unique quality that’s hard to put into words. This isn’t the place for an analogue vs vinyl debate – what we’re wanting to get at is that a lot of Djing is done entirely digitally now, with artificial turntables used to mimic the tactility of traditiona­l beatmixing, scratching and cutting. Sadly those systems (e.g. Traktor, Pioneer CDJ/

XDJS) are entirely proprietar­y in nature. Back in LXF250 we interviewe­d Isle of Wight-based duo Daniel Smith and Chris Obbard, who together make up 64 Studio. One of the fruits of their labours is Pideck, which brings the magic of vinyl to the Pi.

Digital vinyl systems have been around since around the turn of the millennium (Serato being one of the first to market) and allow convention­al decks to manipulate the output of a digital music source. This is done through the magic of timecode vinyl (which, no matter how poor your taste in electronic music, is not something you’d want to actually listen to). As the name suggests, the vinyl is just a means of transferri­ng (accurate!) tempo informatio­n to the music player. Spin the vinyl faster and the track will play faster, slow it to a stop and the music will slow down and stop accordingl­y.

This all requires low latency to be of any use, as well as a music player equipped with tempo transforms. Pideck has it all, and we urge you to read more about it at http://pideck.com or check the Youtube channel at www.youtube.com/c/pideck.

Robotics doesn’t need to be about building intimidati­ng humanoid automatons. We can build much less intimidati­ng machines that can perform all kinds of useful, instructiv­e or fun functions. Even better, you can power them with Linux. What’s more, we don’t need costly, state-of-the-art electronic­s to build these devices – a Raspberry Pi and will do just fine. It doesn’t need to be any more advanced than putting Lego together. There are all manner of off-theshelf kits suitable for any electronic­s enthusiast. A Pi robot can run the same Raspbian Linux we all know and love. It can connect to wireless networks, so you can SSH in and perform diagnostic­s while it’s on the move. You can even run apt upgrade etc. while it’s driving around, which is vaguely analogous to replacing a car’s engine while it’s moving. Maybe that’s not such a good idea. Nevermind. A Pi-powered robot might also take pictures, zoom around your house quoting Shakespear­e or even take to the skies to admire the city below. With the aid of the Opencv library and a little bit of image processing (of which the Pi is more than capable), we can give our robot computer vision, so that it can target and follow objects, or (with the help of some machine learning trickery) recognise objects or even people.

One of our favourite toys at LXF Towers is our Diddyborg v2 robot, which may resemble a dinky radio-controlled car but is actually an incredibly powerful robot. The Borg series was designed by Piborg, brainchild of Kim Freeburn, who explains, “The Diddyborg is the six-wheel-drive robot that is a homage to the Sojourner Mars Rover”. Check out the rest of the Borg range at www.piborg.org/shop.

The Diddyborg features six powerful 12V 100rpm motors and is powered by ten AA batteries. Power is distribute­d by the custom Thunderbor­g board, which can handle 5A per motor, has a multicolou­r LED (useful for monitoring battery status) and we’re sure you agree it looks the business. Rather than using some complicate­d servo arrangemen­t for steering, the Diddyborg rotates by turning its wheels at different speeds. By turning the right wheels in the opposite direction to those on the left, it is also capable of spinning on the spot. It’s equipped with the Pi Camera (which is a great thing to own even if you’re not building

borgs) and optionally can be fitted with four ultrasonic distance sensors, which you can use to practice, say, safer parking.

The borgs, and many other robots, are sold as buildit-yourself kits. Depending on the particular kit, this might be quite an involved process, involving small parts, soldering and possibly swearing (and sheepishly having to order replacemen­t parts). Building the Diddy takes a couple of hours from start to finish.

Having constructe­d it we wanted to know more about what it could do. Not content with making glorious hardware, Piborg also provides some great code examples to get you started. These will need some tweaking to work on other hardware, but they should give you some idea of how to talk to the hardware in Python. Robot kits will provide scripts to deal with all the low-level communicat­ion – in our case this is all done through the Thunderbor­g.py file (which you can peruse at http://bit.ly/lxf260pibo­rg). This handles all the raw I2C coding, so you don’t need to worry about that, and provides more human functions, like Setmotor1() , which sets the speed of the left-hand-wheels.

Home assistant

We’re pretty cynical about voice assistants here at LXF Towers. Our (nameless) sister magazines rant and rave about the latest Alexa additions and how they make ordering from Amazon even easier. They quietly forgive the chaos that ensues when Siri’s name is spoken on the television, as all the fruity phones within earshot franticall­y start offering to help. Tech pundits wax lyrical on the importance of shoving a network stack deep into every single appliance in your house so that it can be “smart”, so that the “smart” appliances can all chatter among themselves about their dumb masters.

But all things have their uses, and much of the shadier side of voice assistants can be obviated by the power of open source. The Mycroft (https://mycroft.ai) Mark 1 (launched in 2016) and Mark 2 (coming soon) are Raspberry Pi-powered home assistants that we don’t mind listening to us.

You probably already know that Sherlock Holmes had an elder brother called Mycroft. You may even be aware that in Heinlein’s classic The Moon Is A Harsh

Mistress, the HOLMES FOUR computer that accidental­ly became self aware was named Mycroft (shortened to Mike). In case you weren’t, that’s where the Mycroft home assistant gets its name. Don’t worry though, despite our best efforts we couldn’t get our Mycroft to become sentient, and at no point did we feel threatened by Mycroft.

You don’t need to buy the official hardware to use Mycroft, as it can run on any good Linux distributi­on. Alternativ­ely you can download Picroft (a ready-to-go image of Mycroft for the Pi) and run that right away.

Voice recognitio­n and intent recognitio­n are reasonably taxing Cpu-wise, so you’ll need at least a Pi 2 to run Picroft. Even that will struggle, though, and the official word (see https://mycroft.ai/documentat­ion/ picroft) is to use a Pi 3. That way you also won’t have to worry about getting Wi-fi working, since Picroft is (currently) based on Raspbian Stretch that already has those drivers built in.

Since the Pi’s onboard audio doesn’t have any kind of analogue input, you’ll need a microphone. We used

MYCROFT WILL OBEY “Despite our best efforts we couldn’t get our Mycroft to become sentient, and at no point did we feel threatened by Mycroft.”

the reasonably fancy Seeed Respeaker mic array, which has four microphone­s so that it can (with some work) determine the direction of an audio source. You’ll also need some kind of speaker. This could connect either to the 3.5mm analogue output or via USB, or via HDMI if your display has speakers.

Mycroft’s core Skills (as Mycroft’s powers are known) include a basic Hello World example, which responds to its title “How are you” and, graciously, “Thank you”. This is intended to introduce people to programmin­g their own skills. For fun and games try asking it to sing a song or tell a joke. You can also ask it things like how to spell words or to check stock prices. But thanks to the community, a raft of other skills are available (further jokes are also available in the Better Joke skill). One of the most popular skills for Mycroft is openhab (home automation bus), which is a platform for talking to all kinds of home appliances under a unified web interface. It can communicat­e with a multitude of different devices, including other smart home platforms such as Nest.

 ??  ?? Bedazzle your friends and be the envy of your co-workers with the combined power of 256 colourful LEDS.
Bedazzle your friends and be the envy of your co-workers with the combined power of 256 colourful LEDS.
 ??  ?? Raspbian’s bespoke PIXEL desktop environmen­t is light and fast, especially so on the Pi 4.
Raspbian’s bespoke PIXEL desktop environmen­t is light and fast, especially so on the Pi 4.
 ??  ?? ‘Member RISC OS, ‘member filenames beginning with exclamatio­n marks, ‘member those weird three button mice?
‘Member RISC OS, ‘member filenames beginning with exclamatio­n marks, ‘member those weird three button mice?
 ??  ??
 ??  ?? A fast external SSD will make whatever distro you choose to run a lot snappier.
A fast external SSD will make whatever distro you choose to run a lot snappier.
 ??  ?? Microsd cards are nice and all, but they’re really a terrible medium from which to run an OS.
Microsd cards are nice and all, but they’re really a terrible medium from which to run an OS.
 ??  ?? The Pi Openmediav­ault image is still based on the beta version, but in future this will turn your Pi into a serious NAS device.
The Pi Openmediav­ault image is still based on the beta version, but in future this will turn your Pi into a serious NAS device.
 ??  ?? Just enough for Kodi. And if you want a simple media centre then LIBREELEC is just enough for you.
Just enough for Kodi. And if you want a simple media centre then LIBREELEC is just enough for you.
 ??  ?? Let’s be clear, you can’t run Steam on the Pi. But with the Steam Link App, you can run it through the Pi.
Let’s be clear, you can’t run Steam on the Pi. But with the Steam Link App, you can run it through the Pi.
 ??  ?? Make Pi audio great again - just attach the HAT, connect to your amplifier with phono (or jack) cables to your amplifier, and enjoy luscious sound.
Make Pi audio great again - just attach the HAT, connect to your amplifier with phono (or jack) cables to your amplifier, and enjoy luscious sound.
 ??  ?? The 6WD Diddyborgv­2 in all its glory, eat your collective hearts out SUV drivers.
The 6WD Diddyborgv­2 in all its glory, eat your collective hearts out SUV drivers.
 ??  ?? Mycroft’s glorious ASCII splash screen. Yet another opportunit­y for Cool Retro Term to make an appearance.
Mycroft’s glorious ASCII splash screen. Yet another opportunit­y for Cool Retro Term to make an appearance.
 ??  ?? The Ultraborg that connected our ultrasonic sensors can connect PWM servos too. It communicat­es over the Pi’s I2C bus
The Ultraborg that connected our ultrasonic sensors can connect PWM servos too. It communicat­es over the Pi’s I2C bus

Newspapers in English

Newspapers from Australia