Showing posts from 2020

Boot Raspberry Pi 4 from USB SSD without SD Card

The Raspberry foundation has recently published a new beta version of their firmware for the Raspberry Pi 4 Model B, which supports booting from USB. Finally. This means no SD Card is not required anymore, the bootloader can be loaded from an USB mass storage device! This is a major improvement!  Note : This approach only works with the official Raspberry Pi OS, either 32bit or 64bit. Ubuntu, unfortunately does not yet work, as there are changes required to uBoot, uncompressing the kernel image, etc. to support booting from the USB Drive on Raspberry Pi. This is a step by step instruction loosely based on  Jeff Gerling's  I'm booting my Raspberry Pi 4 from a USB SSD  and  James Chambers's  Raspberry Pi 4 USB boot config guide for SSD flash drives . Please note that the second article was published before USB boot was possible and thus is using a workaround of loading the bootloader from SD and the root filesystem from the SSD. In the following tutorial, we'll make sure

Cytron Heatsink Review for Raspberry Pi4 with Stressberry

The Raspberry Pi4 had some thermal issues in the past and people were advised to add at least a heatsink when running CPU intensive workloads. A firmware update has improved the situation to a great extend, but decided to attach a heatsink with a fan, just to be sure. So let's see if the heatsink+fan from Cytron is actually doing anything good on the Raspi. So I wanted to gather stats for the following situations No heatsink Heatsink with fans turned of Heatsink with fans turned on. And I wanted then to look nice make sure that they also capture the temperature before and after the stress test. That's why I used  Stressberry  and loosely followed the tutorial from Core Eletronics . But first things first: Update your system sudo apt update  sudo apt full-upgrade And install Stressberry sudo apt install stress  pip3 install stressberry --user Detour #1 Should the above command fail with an error similar to the one below, your are missing some packages to be able to bu

Powerful Image to PDF Conversion with OCR for free with WSL

I decided to move as much as possible to cloud and I'm quite happy with the decision. Especially the OneDrive mobile app helps with scanning of paper documents. Its free for up to 10 pages and includes OCR !  But what about the tons of images that are actually scans from documents? Sure, converting images to PDF is easy, and there are a lot of tools (usually already included in your favorite OS or browser as a virtual PDF printer). So what's the catch then? Well, encapsulating a image in a PDF does actually not really utilize the strengths of the PDF format which is storing text. And without text, no modern OS will be able to index your files to make your digital archive searchable. My requirements were relatively simple Run OCR on existing PDF files and save the text in the existing PDF (or replace it) Convert on a image file and convert it to a PDF with embedded text from OCR Convert and merge multiple image files to one PDF with embedded text from OCR Running the above use c

Use Bodmer TFT_eSPI Library with PlatformIO

If you start playing around with TFT on your ESP8266 or ESP32, you will arrive at the excellent TFT_eSPI Library by Bodmer . It's not only magnitudes faster than the Adafruit driver , it's also comes with support for a wide range of display drivers. Test results of the TFT_eSPI library Unfortunately it has one catch: The library is not really ready to be included as a library in your projects as it requires adjustments in the library itself. While it's not uncommon to define your settings with #define directives, this library expects you to patch files to configure it . The official way goes like this Locate the library folder (Windows would be Documents\Arduino\libraries\TFT_eSPI ) and create your own setup in the library sub folder User_Setups To use your configuration, patch the file User_Setup_Select.h  to include your configuration This has obviously some disadvantages. At latest when you wan't to update the library or work with different screens at the same tim

Migrating from Arduino IDE to Visual Studio Code to PlatformIO

Like every other beginner on ESP8266 I started with my first steps in the official Arduino IDE. I was impressed by the simplicity and easy to use examples that were build-in to the UI. Also the simple UI made it easy to start in uncharted land, especially for someone that did never develop embedded firmware. The library manager let me install additional libraries to play around with, and it also mostly worked. Standard Arduino Editor (IDE) Needless to say, I missed a lot of the features that I was used to from more powerful IDE's like IntelliJ or Visual Studio. I think even Visual Basic 6 had a better IntelliSense support than the Arduino IDE. In fact, Arduino IDE has none. Also, the lack of a dependency management (for libraries) makes it really hard to share code between multiple peers, as you have to manually install the correct version of a library in the global libraries folder. Guess what happens if you use different versions? But overall the Ardunio IDE is a g

Synology Presto Review

I still run my NAS in Switzerland while I'm living abroad in Singapore. I frequently run backups of for my files where I leverage my Switzerland NAS as an off-side backup location. After all, keeping my NAS in Switzerland is cheaper than the costs for international shipping from Switzerland to Singapore. But it comes with two draw-backs: Average internet connection speed is still worse in Switzerland compared to other places, especially the upload speed Latency is typically around 370ms, which unfortunately has a huge impact on file transfer speeds. While the first issue can be solved with money, the second is more expensive. During some analysis on the topic, I found that Synology actually came up with an extension called Presto  for their DSM. It's based on the somewhat mysterious technology called "SITA" which should solve the issue of high latency transfers. According to their explanation on YouTube (video below), they are able to use the available bandwid