A pocket-sized Linux handheld built around the Raspberry Pi 3B+, designed for hacking, coding, and field use. Runs Raspberry Pi OS or Kali Linux. One of few handhelds that lets you write and run code directly on the device.

YARH.IO M2 in hand

YARH.IO M2 is powered by a Raspberry Pi 3B+, offering the best ratio of functionality and computing power for a mobile, battery-powered device. The board is stripped down to reduce total height. The ethernet RJ45 connector has been removed, and the double-stack USB connectors were replaced with single-stack USB connectors.

Pimoroni HyperPixel 4-inch IPS 800x480 display delivers a sharp, clear, and bright picture with a wide viewing angle. Capacitive touch screen with multi-touch allows for simple and easy interaction with the user interface.

YARH.IO M2 with accessories

Minimalist Bluetooth keyboard provides comfortable typing when holding the device with both hands. Modifier keys grant easy access to special control keys and functions. Custom key remapping simplifies interaction with the system and its applications.

YARH.IO M2 left side with USB ports

A single, removable, high-capacity Fenix ARB-L18-3500U 3500mAh Li-ion USB Rechargeable Battery powers the device. Removable battery ensures that an empty battery can be quickly replaced with a charged one. Fenix rechargeable battery provides direct charging via a Micro USB connector and a built-in battery charger.

High output Step-Up power supply has been used to effectively support power-hungry USB accessories.

YARH.IO M2 top view

Arduino Pro Micro module controls the battery voltage. The module reads battery and power supply voltage, making the results available over I2C bus to the Raspberry Pi and to various custom-built applications. The module also controls the power LED as a way to indicate battery charge status.

With Arduino IDE installed, it is possible to program Pro Micro directly on the device, to customize battery charge LED indicator, and to add other creative functionality.

The DS3231 High Precision RTC Clock Module is used to store current time and date for the Raspberry Pi.

YARH.IO M2 back view

YARH.IO M2 features simple mechanical design. Main frame used for mounting the Raspberry Pi board and screen, power bed in conjunction with front panel provides mounting points for keyboard, power supply, battery, RTC and Pro Micro module.

Back panel features an open battery bay, allowing for quick battery replacement. When battery replacement is not required, the bay can be covered with the battery cover. This setup ensures that the battery can always be charged using the battery's built-in charger.

The I2C bus is available while the I2C connector is mounted on the right side of the device and can be used to connect external modules with I2C connectivity. Pimoroni HyperPixel display utilizes all Raspberry Pi GPIO pins, therefore no additional GPIO connectors are present for external devices.

YARH.IO M2 back open

No 'click' assembly used. This is a fully hackable device with stainless steel button socket cap screws used throughout for multiple assembly and disassembly cycles.

The corners of the housing are protected with eight rugged-design rubber bumpers.

All parts are 3D printed using PLA and Flex plastics. ABS and ASA plastics can be used as an alternative, but require use of advanced printers and techniques.

The list of parts used for the YARH.IO project can be purchased from Amazon and other online stores is available below.

Parts

Part Source
Raspberry PI 3B+Raspberry Pi
HyperPixel 4.0 - Hi-Res Display for Raspberry Pi – TouchPimoroni
Mini Bluetooth KeyboardAmazon
Power Supply, 3.6V to 5V, 2AAmazon
Fenix ARB-L18-3500U Li-ion rechargeable batteryFenix Tactical
High Precision Real Time Clock ModuleAmazon
Pro Micro ATmega32U4 5V 16MHzAmazon
2 Position 3 Pin SPDT Mini Micro Toggle SwitchAmazon
USB Female Type A 4-Pin DIP Right Angle Jack Socket Connector x 2Amazon
Straight Soldering Mini USB A Type Female Port Plug Jack Socket Connector x 2Amazon
10 Pin IDC Socket Connector MaleAmazon
Flexible Silicone Rubber Wire 24AWG, 28AWG, 30AWGAmazon
#2-56 Socket Cap Screw, Stainless Steel. 1/4'' x 12, 3/8'' x 6, 1/2'' x 4.Trimcraft Aviation RC

System & Software

Software packages

sudo apt install tmux vim mc -y

HyperPixel screen

curl -sSL https://get.pimoroni.com/hyperpixel4 | bash
hyperpixel4-rotate right

Turn off HyperPixel on shutdown

The original link: https://github.com/pimoroni/hyperpixel4/issues/3. Thank you Florian Mirkes.

# Create /etc/systemd/system/hyperpixel4-backlight.service and add the following:

[Unit]
Description=Sets up gpio-poweroff to handle Hyperpixel backlight upon shutdown/reboot
ConditionPathExists=/usr/bin/hyperpixel4-init
ConditionPathExists=/boot/overlays/gpio-poweroff.dtbo
ConditionPathExists=/usr/bin/dtoverlay
DefaultDependencies=no
Before=umount.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c '/sbin/rmmod gpio-backlight;/usr/bin/dtoverlay /boot/overlays/gpio-poweroff.dtbo gpiopin=19 active_low=1'
[Install]
WantedBy=reboot.target halt.target poweroff.target
sudo systemctl enable hyperpixel4-backlight.service
sudo systemctl start hyperpixel4-backlight.service

Enable right-click for the Raspberry Pi touchscreen

The original article: https://fmirkes.github.io/articles/20190827.html. Thank you Philip Howard.

sudo apt install build-essential libevdev2 libevdev-dev -y
git clone 'https://github.com/PeterCxy/evdev-right-click-emulation.git'
cd 'evdev-right-click-emulation'
make all
sudo cp 'out/evdev-rce' '/usr/local/bin/'
sudo chmod +x '/usr/local/bin/evdev-rce'
# Add evdev-rce to startup
sudo usermod -G 'input' -a pi
echo 'uinput' | sudo tee -a /etc/modules
# Edit: /etc/udev/rules.d/99-uinput.rules
KERNEL=="uinput", MODE="0660", GROUP="input"
sudo udevadm control --reload-rules
sudo udevadm trigger
mkdir ~/.config/autostart
# Create: ~/.config/autostart/evdev-rce.desktop and add the following:

[Desktop Entry]
Version=1.0
Type=Application
Name=evdev-rce
GenericName=Enable long-press-to-right-click gesture
Exec=env LONG_CLICK_INTERVAL=500 LONG_CLICK_FUZZ=50 /usr/local/bin/evdev-rce
Terminal=true
StartupNotify=false

RTC

# Create: ~/.rtc-init.sh and add the following:
echo "ds1307 0x68" | sudo -E tee -a /sys/bus/i2c/devices/i2c-11/new_device
sudo chmod +x ~/.rtc-init.sh
# Create ~/.config/autostart/rtc-init.desktop and add the following:

[Desktop Entry]
Version=1.0
Type=Application
Name=rtc-init
GenericName=Initialize ds3231 RTC on non standard i2c-11 bus, address 0x68
Exec=sh /home/pi/.rtc-init.sh
Terminal=true
StartupNotify=false

Bluetooth Keyboard

To connect Bluetooth keyboard for the first time use Bluetooth icon on the menu bar and select Add device. Press hard the Blue Bluetooth button on the keyboard, blue light on the keyboard starts blinking. The keyboard icon and name Bluetooth Keyboard should appear in the Bluetooth devices list. Select and Pair. Enter the digits as prompted on the screen and press Enter key.

To connect Bluetooth keyboard after device reboot, wait until the system completely loaded and press Enter button, blue light on the keyboard start blinking. As soon as blue light turned off the keyboard connected and ready to use.

Remapping Keyboard

The keyboard used has no TAB key. Therefore the FN+Caps remapped to Tab.

# Edit: /usr/share/X11/xkb/symbols/pc and replace existing mapping for <CAPS> with the following one:
key <CAPS> { [ Tab, ISO_Left_Tab ] };

There are keys on the keyboard which can be used to simplify window control. FN+1 - switch between applications, FN+L - maximize current window, FN+0 - perform "sudo shutdown now".

# Edit: /etc/xdg/openbox/lxde-pi-rc.xml and add/replace the following under <keyboard> key:
<keybind key="XF86Mail">
   <action name="Maximize"/>
</keybind>
<keybind key="XF86HomePage">
   <action name="NextWindow"/>
</keybind>
sudo dpkg-reconfigure xkb-data