-
Pi 4 Upgrade
03/28/2024 at 10:37 • 0 commentsFinally, worked out how to cram a Pi 4 into Pickle Pi. This involved a set of new connectors from PiHut and some brutal surgery on the Pi 4. As you can see from the picture below, I had to remove the ethernet connector from the Pi 4 and cut down the IO pins. This I did carefully with snips and pliers.
Side View
The improvement in performance is quite dramatic. I can now browse the web using Chromium and Visual Studio Code is now responsive enough to be pleasant to use. It is a mystery to me as to why Code requires so much memory and CPU time - its not very efficient!
The Pi 4 can be set to cut off power to USB ports on shutdown which reduces power to the level at which the power bank switches off completely. So, no extra power switch is needed as software shutdown turns everything off and power up is achieved by pressing the power bank button.
I was not sure if I would be able to fit the Pi 4 into Pickle Pi so I economised by going for a 2 GB version, however, this seems to be enough memory as long as you do not open a lot of tabs in Chromium
-
Touch Screen & Right Click
03/26/2024 at 13:35 • 0 commentsWith a clam shell device, use of a touch screen to me feels awkward and unnatural, so I normally use a mouse with Portable Pi since I typically use it when seated at a table. In contrast, I normally use Pickle Pad with it on my lap and so I have been forced to use the touchscreen. The difficulty with this is, with a standard installation of the Raspberry Pi software, there is no way of doing the equivalent of a mouse right click. Following the usually googling, I tried the following four ways of doing right click:
evdev-rce
This right click emulation program creates a right click event for a long touch. This worked OK when I first ran it but then after a while the right click menus only stayed open with finger on the screen - on lifting the finger the menu closed making it impossible to select anything.
xdotool
You can create a right click event with the command xdotool click 3 and then activate it with a keyboard shortcut. This did not work for me in all contexts. For example, it did not bring up the menu on the task bar.
touchegg
This is a program available from GitHub - JoseExposito/touchegg which runs in the background to support multi-finger touch gestures. A two-finger touch creates a right-click and this worked for me. However, it is really intended to work with touch pads and the problem with using it on a touch screen is that it is difficult to accurately locate your two finger touch over a target object such as the task bar.
QMK Mouse Emulation
This is the solution I should have thought of from the outset! The QMK keyboard software that the Gherkin controller runs, has a complete mouse emulation feature. It is only necessary to allocate keys to the mouse movement and button functions. I can upload the keyboard map if anyone is interested. The great advantage of this solution for tablets with keyboards is that it is independent of the Window manager and so will also work with Wayland.
I had to reflash the keyboard controller after recompiling QMK with the modified key map. All of the videos I watched only mention grounding the reset pin to put the controller into bootstrap mode for reflashing. This would have meant dismantling the Pickle Pi - undoing twenty screws. Luckily, before I did this, I realised that there is a (configurable) key combination to put the Gherkin into bootstrap mode - hold B press ESC.
-
Increasing performance of Pi Zero 2 W based Pickle Pi
03/22/2024 at 12:06 • 0 commentsBefore taking the drastic step of moving to a Pi 4, I thought I would see what could be achieved by looking at using some of the standard Raspberry Pi performance enhancement techniques.
First, I installed More RAM using Pi-Apps. This uses a compression algorithm on the contents of RAM to reduce its size and thus increase the size of virtual memory at the expense of CPU time. It replaces swap space on the SD card which I had already increased to get Chromium to display pages without freezing. I did not see a noticeable improvement in displaying web pages, however, moving swap space from the SD card onto compressed RAM or zram has the big advantage of reducing wear on the SD card.
Secondly, I added the following overclocking instructions to /boot/config.txt :
#overclock 1300 arm_freq=1300 over_voltage=6 core_freq=500
The combination of these two modifications makes Chromium just about useable although still painfully slow at times. In fact, I used Pickle Pi running Chromium to write this log,
I am still working out how to fit a Pi 4 into Pickle Pi - the subject of the next log I hope.