RSSAmplifier

Blog

Ayke van Laethem

Recent content on Ayke van Laethem

aykevl.nlRSS feed ↗48 posts

Latest posts

Syncthing on a Kobo

How to install Syncthing on a Kobo e-reader

RGB LED earrings (36 LEDs, with microphone)

These are new earrings, very similar to my previous 36-LED earrings but with an extra button (to make it easier to cycle through many modes) and a microphone (for audio reactivity and programming custom patterns ). Other than that, they're almost identical: same MCU, same LEDs, same PCB shape, etc. 
 
 You can find the KiCad design files, source code, and instructions on how to program…

Hot chocolate

Extra hot chocolate, with the addition of pepper.

Vegan pea soup

A variation on a traditional Dutch winter dish.

Binary Code Modulation

Bitbanging many LEDs from a microcontroller can be very fast, when using Binary Code Modulation and some assembly.

Charlieplexing

Charlieplexing is kinda difficult to wrap your head around initially, but once you understand it, it actually makes a lot of sense. This post will try to show you how it works and why it's actually quite beautiful.

RGB LED earrings (36 LEDs)

I've made new and improved RGB LED earrings, with double the LEDs compared to my previous LED earrings . They also have some other improvements: they're more power efficient and the LEDs just look a lot better. 
 
 You can find the KiCad design files, source code, and instructions on how to program them on the GitHub page . 
 I used to sell them on Lectronz but these are all sold out.…

Autoplay video on an analog TV using a Raspberry Pi 3

How to configure a Raspberry Pi to auto-play videos from a USB stick, without needing any input. It's not yet entirely working as intended, but this is what I got working so far.

Travelling while being neurodivergent

Tips and tricks on how to survive and even enjoy travelling when you're neurodivergent.

RGB LED earrings

I've made RGB LED earrings, like these: 
 
 You can find all the instructions on how to program it on the GitHub page . 
 I made these initially because I wanted to wear them myself, but as it turns out they're quite popular. You can buy them on Lectronz . 
 The design is available on oshwlab.com if you want to build your own.

Making a silent lounge

Some thoughts on what would be nice to have in a silent lounge, especially at hacker events.

Fast antialiased polygon scanline rendering

This post describes a fast algorithm for rendering polygons on slow hardware, and gives an intuitive explanation as to how it works. The algorithm was originally based on the A-buffer algorithm but modified to work better on modern microcontrollers.

TinyGo Preview - how does it work?

I've updated play.tinygo.org to more accurately simulate hardware, and now also brought this feature to VS Code. But how does it work?

CGo improvements in TinyGo

CGo is faster in TinyGo, here's how that works.

What's the int type?

The int type is present in many programming languages, but their meaning varies. Unlike what many people think, it only indirectly related to pointer size or architecture word size.

Optimizing constant bitshifts on AVR

The AVR architecture does not natively support arbitrary bit shifts. Therefore, compilers will have to be creative to make shifts short and fast. This post explores how a compiler could emit such constant shifts inline.

Garbage collection in TinyGo

An explanation of how garbage collectors work including some pseudocode how a real GC could be implemented.

ESP32 and ESP8266 support in TinyGo

How ESP32/ESP8266 support got added to TinyGo, how we got there, and the current status of support.

Debug AVR programs using simavr and avr-gdb

Quick note to get started with debugging AVR programs in a simulator

What RGB and sRGB mean

What RGB really means, what sRGB and gamma are and how to correctly blend colors.

DMA on the SAMD21

How to configure DMA on the SAMD21, for example to use it with SPI.

How the TinyGo playground simulates hardware

The TinyGo playground simulates real hardware, including an e-paper display. How can it do such things? This post explains a bit about how the playground works to make this possible.

LLVM from a Go perspective

A high-level overview of LLVM IR, showing how two simple Go functions can be translated to IR.

Goroutines in TinyGo

TinyGo uses LLVM coroutines to implement goroutines. This post explains what coroutines are and how they're used to implement goroutines.

Interfaces in TinyGo

How TinyGo implements Go interfaces in a radically different way, avoiding most memory allocations and reducing code size.

Defer is complicated

The defer keyword in Go does much more than you might think, leading to performance issues in some cases. Why is this?

Code size optimization for microcontrollers

How to optimize code size for microcontrollers, including compiler options and lots of coding habits that produce smaller and often more efficient code.

Internals of the MBR in Nordic SoftDevices

Nordic BLE chips contain a proprietary SoftDevice implementing the BLE stack. In this post, I will explain how the MBR region works and how to write your own.

Using PvGrub2 on Debian

Using pvgrub2 on Debian is very easy, and there is a little bit of documentation on the 'net, but not enough to cover all needs. I had to do some workarounds to enable pvgrub2 with btrfs.

Enforced STARTTLS for SMTP

While STARTTLS has traditionally been very sensitive to downgrade attacks, there are now two protocols to fix this: DANE and MTA-STS. I will take a look at how they work and how they can be implemented on your own domain.

Understanding modern mail authentication systems: SPF, DKIM and DMARC

Explains how modern email authentication systems work together to protect the "from" header in email. This makes phishing detectable and spamming more difficult.

Uploading README.rst to PyPI

My experience with making a Python package and uploading it to PyPI. Sometimes, such systems aren't as sophisticated as one might expect.

Managing phone addiction

A few tips on how to track how much you're addicted to your phone and how you can manage it. I give a short overview of how habits work. Then I describe how you can track how much you use your phone and give a few tips on breaking a few of those habits.

Using Arduino on the "blue pill" STM32F103 boards

As I gave up on Rust (for now), I tried setting up the Arduino environment to work with the "blue pill" board. It turns out to be quite easy, although there were a few small issues with the setup. You'll still need a (cheap) SWD programmer, though.

Intro to Rust on the STM32

How to write a simple Rust program for the STM32 "blue pill" board that's sold on AliExpress and Ebay for about $2. It turns out to be not too difficult.

Using AddressSanitizer and Valgrind on Android recovery

How to use memory checking tools inside an Android recovery to detect things like buffer overflows. A recovery system like TWRP is quite different from a normal Android image, so the official guides apply only partially and it needs some manual work to make these tools work. Here's how I did it.

Flashing the HM-10 firmware on a JDY-08

Use CCLoader to flash the official HM-10 firmware on a cheap Chinese JDY-08 device. Unfortunately, the process doesn't result in a working device, but at least I got somewhere.

Using the JDY-08 module

A look at the JDY-08, a cheap BLE module found on the online Chinese markets. It works, but it turns out that it isn't really useful with the original firmware.

Concise version vectors

Concise version vectors is the algorithm behind DTSync. It is a distributed algorithm with low memory complexity, with barely any overhead of adding another replica.

DTSync: bidirectional directory synchronisation between any number of replicas

A new bidirectional synchronization tool like Unison that can synchronize many distributed replicas

Putting a Raspberry Pi 1 SD card into a Pi 3

How to move an installed SD card from a Pi 1 to a Pi 3, or make it possible to use them both. There are a few tricks to get the network running on both devices.

LED strip

I have made a LED strip based on the ATtiny85 / Digispark. 
 ATtiny85 based 
 Here's a video, though it looks much nicer in real-life: 
 
 
 
 What you'll need: 
 
 An ISP programmer, for example another Arduino (or leave out some features) 
 A string of 30 LEDs type WS2812 
 Two generic push buttons 
 Soldering gear 
 Source code 
 
…

Installing Debian on a Btrfs subvolume

How to install Debian on a Btrfs subvolume to easily make system snapshots.

Safely Embedding JSON in JavaScript

How do you embed JSON in JavaScript? The naive approach turns out to have a XSS and DoS vulnerability, but this is easily fixed with a simple filter.

Setting up HTTPS on nginx from start to finish

Turn a plain HTTP web site served with nginx into one with HTTPS and SPDY support. Includes StartSSL, Postfix and OCSP stapling.

South: stateless authenticated sessions for HTTP in Go

I have written a Go package for stateless authentication using HMAC. I believe this system is in practice just as secure as session IDs without having to store state on the server, making authentication a whole lot easier.

:link and :visited are mutually exclusive

I discovered that the CSS pseudo-classes :link and :visited are mutually exclusive. This in contrast to what may seem more logical, that is, that :link applies to all links.

Fix 'jumping scrollbar' issue using only CSS

I discovered a technique to prevent page jumping when navigating between short and long pages without showing the scroll bar all the time.