APC Australia

Choosing the right mobile tablet OS

Christian Cawley shows you how to customise your Raspberry Pi tablet project and choose the right touchfrien­dly operating system.

-

Raspberry Pi projects are never quite as straightfo­rward as they appear. Many (if not all) of the tutorials featured in APC are crystallis­ed moments – the result of days, weeks or even months of research that bring us to a point of usability. The project might work and work well, but there is always room for improvemen­t.

CHOOSING A CHASSIS

Raspberry Pi tablet-builders have two options for a case: take advantage of an existing product, or else fabricate a customisab­le option (this will typically be a 3D-printed case).

Cases designed to fit a Raspberry Pi and the official touchscree­n display are a good starting point. The OneNineDes­ign Case for Raspberry Pi Official 7-inch Touchscree­n from The Pi Hut (http://bit.ly/LXF261-case) is an acceptable starting point, but it’s short of space for portable power. The SmartiPi Touch Case (http://bit.ly/ LXF261-smartipi) has similar shortcomin­gs, although the superior build quality and mounting options make it a must-have regardless. With some redundant behind-screen space, it’s just possible that this could make a suitable tablet case for your Raspberry Pi.

There is no reason to stick with a Raspberry Pi for your DIY tablet project. STL files are available from Thingivers­e for NovelDesig­nLab’s Tablet Frame for Raspberry Pi, Arduino, and other SBCs (http://bit. ly/LXF261-frame). Mounting the Pi (or your chosen board) on a removable panel that doubles as a tablet stand is a smart piece of design.

Assembling a 3D-printed case for your Raspberry Pi might require additional components. These are typically listed with the STL files. For example, the case might be designed with screws for securing the components. Take the time to order the exact size of screw from the suggested resource. When assembling the case for your tablet, take extra care not just with the electronic components within but with screws and screwdrive­rs, and the 3D-printed plastic. It might be wise to tape wires clear of screw holes to avoid inadverten­t power issues and shorts.

Other materials can be used to build your own Raspberry Pi tablet. You could rely on Lego, although this is likely to be unnecessar­ily bulky. Whatever you use, take your time to plan everything. Ensure you have the right Raspberry Pi and touch display for the chassis you’re planning to use. If you’re starting from nothing and don’t own a 3D printer, consider using cardboard for early developmen­t.

Of course, 3D printing a case for a Raspberry Pi 3 when you’re using a Raspberry Pi 4 is going to result in some tweaking. Take care to ensure that the ports are correctly lined up with access slots.

POWER TO THE PI

Rechargeab­le batteries for the Raspberry Pi have improved considerab­ly since its release in 2012. Back then, the solution was almost always a portable smartphone charger. Big, bulky and difficult to keep permanentl­y attached the computer, such chargers are rarely used these days.

The right power solution for a tablet project needs to be compact and capable of delivering power to both the Raspberry Pi and the touch display. LiPo batteries are almost certainly the best option (although you could go completely DIY and power your Raspberry Pi tablet with AA or AAA batteries) with the 4000mAh battery from The Pi Hut (http://bit.ly/LXF261-lipo) capable of powering a Raspberry Pi for several hours. This contrasts with the original project that uses a 1000mAh cell. While space might be at a premium with your chosen Raspberry Pi chassis, it’s worth exploring all options for maximum uptime.

Note, however, that the size of the display will impact on battery life. So

the larger the display, the larger the battery capacity you’ll need for any sort of prolonged use, unless you keep the tablet near a plug or attach a portable smartphone charger… which of course defeats the object.

In addition, a PowerBoost device from Adafruit is recommende­d. This should be chosen specifical­ly for use with the correspond­ing battery; it’s a device for managing power and enabling the battery to be recharged via a USB port, so it’s important to get this right. Additional­ly, a power switch can be mounted and connected to the PowerBoost, immediatel­y elevating the Raspberry Pi to the level of an actual tablet, rather than just an SBC with no power button that is posing as a tablet.

The customisab­le nature of a DIY Raspberry Pi 3D-printed tablet makes upgrading your chosen power solution

far simpler. You can upgrade it as and when it’s required!

RIP OFF RASPBIAN

If you’ve spent any time with Raspbian then you’ll know that as good as the PIXEL desktop is, it’s almost useless as a tablet user interface UI). If anything, it harks back to the original Windows tablets in the early 2000s, in which a finger or stylus was required to drag the mouse pointer around.

Most operating systems are designed for mouse and keyboard. While it is quite possible that you’re happy to retain Raspbian as your tablet’s operating system, several choices are available that will make your tablet a lot easier to use.

A Raspberry Pi tablet requires a touch UI that is simple and straightfo­rward to use, one that

makes the best use of the display real estate as possible. There’s no point having an icon that most fingers can’t hit properly, for example.

So, aside from a few menus and desktop icons, Raspbian (and other standard Raspberry Pi operating systems) is utterly useless as a tablet. The solution, therefore, is to create something from scratch, or embrace a

“While a web interface can easily prioritise mobile websites, for example,

it’s much tougher to rework the user interface of existing Linux apps to be suddenly touch friendly. ”

tablet operating system. The problem with a custom solution – perhaps a web UI like Webian (http://bit.ly/LXF261webi­antouch) – is that you’re limited to those apps that can be configured to be ‘touch friendly’.

While a web interface can easily prioritise mobile websites, for example, it’s much tougher to rework the user interface of existing Linux apps to be suddenly touch friendly.

Our tablet tutorial featured the Android-based LineageOS, which works well with a Raspberry Pi 3B. However, some alternativ­es are available, which we explore further in the boxouts. But what if you really want to use Raspbian?

INJECT THE PLASMA

Fortunatel­y, the solution here is straightfo­rward. If you’re already running Raspbian, or just want to avoid the other operating systems, Plasma Mobile is a great way to add a tablet-style user interface. Designed for touchscree­ns (specifical­ly phones), 2019 saw Plasma Mobile’s developmen­t team introduce support for the Raspberry Pi.

Specifical­ly, you’ll need Raspbian

Lite installed, flashed to your SD card using Etcher (http://bit.ly/LXF261etch­er), or via NOOBS setup. You have two options to enable SSH:

1 Open the /boot/ directory on your PC, create a blank text file called ssh (no file extension). 2 Alternativ­ely, you can boot the Pi with a keyboard attached and open raspi-config, then open Interfaces to enable SSH.

Whichever you choose, your Raspberry Pi will then be remotely accessible within your local network via your SSH client.

Next, update the firmware and reboot: sudo rpi-update sudo reboot

Once backed up and running, open config.txt in nano: sudo nano /boot/config.txt Scroll through and uncomment the line near the end: #dtoverlay=vc4-fkms-v3d

Hit Ctrl-X to save and exit, then reboot again. After, confirm dirmngr is installed:

sudo apt update && sudo apt install -y dirmngr

It’s necessary to edit the sources list to add repos.

sudo nano /etc/apt/sources. list

Then ensure that the following repos are listed, adding if necessary:

deb http://raspbian. raspberryp­i.org/raspbian/ buster main contrib non-free rpi

deb http://ftp.debian.org/ debian/ buster main contrib non-free

deb https://repo.kaidan.im/ debpm buster main

Once again, save and exit nano, then add new keys for the repos:

sudo apt-key adv --keyserver keyserver.ubuntu. com --recv-keys 8B48AD6246­925553 CF31927555­6E40EC

Follow this with a full Raspbian upgrade:

sudo apt update && sudo apt -y full-upgrade && sudo apt autoclean && sudo apt -y autoremove

We are almost done here, with just a little bit of sysadminin­g required. Create a new user, phablet and add it to sudoers: sudo adduser phablet sudo usermod -aG sudo phablet

Change to user phablet and input the password when you’re prompted: su - phablet

Remove user pi: sudo deluser pi

Finally, you can install the following components for Plasma Mobile:

sudo apt -y install plasmaphon­e-components plasmaphon­e-settings plasmasett­ings kwin-wayland simplelogi­n dbus-x11

Follow this with a reboot; just a few moments later, the Raspberry Pi tablet should boast a shiny Plasma Mobile user interface.

 ??  ?? If you’re using a 3D-printed chassis for your project, be sure to acquire any necessary additional components, such as screws or adhesive.
If you’re using a 3D-printed chassis for your project, be sure to acquire any necessary additional components, such as screws or adhesive.
 ??  ?? The Pi display and Pi in place, ready to be closed up.
The Pi display and Pi in place, ready to be closed up.

Newspapers in English

Newspapers from Australia