Subscribe to RSS feed

splitbrain.org - electronic brain surgery since 2001

Weblog

RetroPie

Over the last few months I worked on a little Raspberry Pi project. It took so long because I ordered stuff from China and it all took a while to arrive. And because of bad planning I did not order everything at once…

So what does it do? It's a mini game console similar to the NES Mini and SNES Mini only based on a Raspberry Pi and not limited to a small selection of builtin games.

What follows is a description of how I set it all up.

Last updated: 2018/11/05 23:03 · Permalink · Comments

DIY "3rd Hand" Soldering Helper

I'm currently working on a Raspberry Pi project and that needed some soldering. But holding the Raspberry, the wire, the soldering tin and the soldering iron isn't easy with just two hands. So it was time to get a “third hand”.

However I couldn't decide which one to get. The cheap ones are super flimsy and annoying and the expensive ones are… well, expensive.

So I looked around for inspiration on how to make my own and found this video. I liked the idea of using armature wire.

Kaddi's brother also wanted one, so I took the opportunity and built two.

3rdhand.jpg

Last updated: 2018/10/21 15:13 · Permalink · Comments

Back to the Future

Back in 2012 I got my first 3D printer and it was good, but in 2016 I wasn't really satisfied anymore.

What I wanted was a reliable, low-maintenance printer. Something were I could focus on designing the part I need and then “just print it”. So I asked Twitter what printer I should get and every reply I got said “get a Prusa MK3”. So that's what I did.

I ordered the Prusa i3 MK3 kit directly from Prusa and it arrived within a few days. It took Kaddi and me several evenings to assemble. I would guess about ten hours in total.

The overall assembly experience was fantastic. The kit ships with a printed guide and has an online manual that has additional helpful comments from users. The instructions are step by step with lots of pictures, a bit like a Lego manual. The kit even contains the needed tools and a whole bag of spare parts.

Of course the assembly wasn't without difficulties…

Last updated: 2018/10/14 15:35 · Permalink · Comments

Drink More Water

Lifehack: Drink water to avoid dehydration ;-)

I spend a lot of time at my computer. I'm also a lazy person. And even though I know I should get up and get another glass of water I often won't. Because ugh… that's work.

How could I solve this problem? I first looked into various water bottles, but somehow they were all either rather small (<2 liters) or a bit unwieldy. So i came up with a different solution:

There's a 5 liter water bottle in the shelf and the dispenser is rechargeable via USB. Problem solved.

Tags:
diy, water, hydration
Similar posts:
Last updated: 2018/08/31 22:17 · Permalink · Comments

Thinkpad X240 Arch Linux

It's 4 years since I got and setup my Thinkpad x240 using Xubuntu. I wasn't really happy with the Ubuntu subsystem anymore so I decided to set up a new OS. I went with Arch Linux this time. Still using XFCE as a Desktop Environment.

Many of the things I had to manually adjust for the hardware a few years ago now work out of the box. Below is a list of things I did.

Packages

After the basic install I installed a whole bunch of packages and configured them

  • still during the installation:
    • vim intel-ucode grub
  • Utilities:
    • git unzip bzip2 wget curl sudo fakeroot htop iotop make gcc openssh tree keychain imagemagick
  • XFCE Desktop:
    • xorg xf86-video-intel mesa xfce4 xfce4-goodies lightdm lightdm-gtk-greeter light-locker mugshot gnome-keyring
  • Fonts:
    • ttf-dejavu ttf-liberation ttf-droid ttf-ubuntu-font-family ttf-roboto noto-fonts ttf-bitstream-vera
  • Sound:
    • pulseaudio pulseaudio-alsa alsa-utils pavucontrol
  • Network:
    • networkmanager network-manager-applet nm-connection-editor networkmanager-openvpn openvpn gigolo gvfs gvfs-smb bind-tools
  • Devel:
    • php-apache php-gd php-intl php-sqlite xdebug nodejs yarn docker
  • Desktop-Apps:
    • chrome dropbox inkscape gimp geeqie hexchat

Emoji Picker

Install the ibus and noto-fonts-emoji and configure “Settings” → “Keyboard” → “Application Shortcuts”. Add

ibus emoji

as a shortcut (I'm using Meta+E). 🦊

Key Remapping

Remapping the PGUP/PGDN keys to POS1/END (and vice versa) is still something I highly recommend. Instead of doing it for X only, there is an easy way to do it on the Kernel level.

Right after installing Arch Linux, you will notice that the END key is not working properly in the linux console.

Pressing Ctrl-V, END will result in ^[[2~, though it should result in ^[[4~. The Wiki recommends adjusting /etc/inputrc, but since we want to remap keys anyway it is easier to simply remap the key to the proper keycode.

Mapping key presses to actual keys happens in the kernel. Each key creates a unique scan code that is then mapped to a key based on your keymap.

Using showkey –scancodes will show you the scan codes generated by the keys in question. Calling showkey will show you the keycodes the keys are mapped to. The problem is that the END is mapped to keycode 110 instead of 107 (the END key on my desktop system) - this is why the END key behaves weird in the console.

Keycode Scancode remap to
PGUP 104 e049 102
PGDN 109 e051 107
POS1 102 e047 104
END 110 (107) e052 109

Keys can easily be remapped using the setkeycode tool. To do so on boot, we need some startup script. In the olden days, we had /etc/rc.local for that. Today we need some help from systemd. Luckily there's a systemd service that can give us our rc.local back. It's available from AUR so I installed it with yay:

$> yay -S rc-local

Simply create a your startup file:

#!/bin/sh -e
 
setkeycodes e049 102 e051 107 e047 104 e052 109
 
exit 0;

Then make it executable and setup the systemd service.

#> chmod 755 /etc/rc.local
#> systemctl enable rc-local
#> systemctl start rc-local

Touchpad

Modern Xorg uses libinput instead of the old synaptics driver. It works nearly perfect out of the box. However you probably want touchtap clicking and may want to reconfigure two-finger taps as middle click instead of right click.

It's quite easy with a single additional config file:

Section "InputClass"
	Identifier "touchpad"
	Driver "libinput"
	MatchIsTouchpad "on"
	Option "Tapping" "on"
	Option "TappingButtonMap" "lmr"
EndSection



That's it. Everything else is just working fine out of the box.

Tags:
laptop, notebook, archlinux, howto
Last updated: 2018/06/21 09:48 · Permalink · Comments

Older Posts are available in the Archive. Keep up to date with the RSS Feed.

Blog

Older Articles are available in the Archive, subscribe to the
Full Content RSS Feed to stay tuned. You can also subscribe to the Link RSS Feed.