Bringing My LEGO Mindstorms NXT Back to Life - Part 2

In the previous part, I managed to bring my LEGO Mindstorms NXT back to life. Now that the device could boot up and had a working firmware installed, the next step was to figure out how to program it. Controlling the NXT with Python My first attempt was to use Python. With the help of AI, I generated a simple Python script using an existing NXT library. By connecting the NXT to my computer through a USB Type-B cable, I could send commands directly to the device and control its motors. For example, I could specify how much a motor should rotate and simply run the script to make it happen. The same approach could also be used to read sensor data. ...

November 14, 2026 · 4 min · Dictated, AI-assisted, human-reviewed

Bringing My LEGO Mindstorms NXT Back to Life - Part 1

Revisiting a Childhood Robot Today, I want to talk about something I used to play with around 15 years ago — the LEGO Mindstorms NXT. The set I had was an educational version of LEGO Mindstorms. It didn’t come with a particularly large number of LEGO pieces, but the most interesting part was the NXT itself, a programmable controller that served as the brain of the robot. You could build a robot using LEGO pieces, connect different sensors and motors to the controller, and then upload a program to it. ...

November 9, 2026 · 3 min · Dictated, AI-assisted, human-reviewed

Reconfigure Kobo - Part 2

In Part 1, I got my Kobo Libra 2 to display an image of my choice. That was fun, but I still had to tell it when to do it. What I really wanted was to wake up in the morning and see my calendar and the weather already on the screen. I used Codex to help write the first version. It could update the screen, and it even worked twice in a row. Then the Kobo went to sleep and didn’t come back. ...

October 12, 2026 · 4 min · Dictated, AI-assisted, human-reviewed

Reconfigure Kobo - Part 1

Today I want to share what I’ve been doing with my Kobo Libra 2. It started with an open-source reader I found online called KOReader. Once I got it running, I had another question. If the Kobo can already draw books and PDFs on its E Ink screen, can I make it draw whatever I want? Installing KOReader The first thing I did was plug the Kobo into my computer over USB. It showed up as a drive, so I could browse the files on its user storage. What surprised me was that I could use that same drive to install something that wasn’t a book. ...

October 11, 2026 · 3 min · Dictated, AI-assisted, human-reviewed

Linux Kernel - Part 3

In this post I would like to review the function for using mmap that is introduced in Why Linux Has This Syscall?! - Tsoding His repo can be found on Github, where he demos 4 type of usage: (1) allocating memroy (2) reading files (3) IPC (inter-processing cache) (4) Precise control over memory protection Allocating Memory #include <assert.h> #include <sys/mman.h> #define N 10 int main(int argc, char *argv[]) { int *xs = mmap(NULL, N * sizeof(int), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); assert(xs != MAP_FAILED); assert(N >= 2); xs[0] = 0; xs[1] = 1; for (int i = 2; i < N; ++i) { xs[i] = xs[i - 1] + xs[i - 2]; } int err = munmap(xs, N * sizeof(int)); assert(err >= 0); return 0; } The above code request N int size memory from linux kernel through mmap, and return the virtual memory in the end by munmap. ...

August 29, 2026 · 3 min

Image processing - Zhang-Suen Thinning

Introduction The next step is to implement the thinning algorithm, where we use the zhang-suen thinning algorithm. This method aims to remove all the points until becoming a single line (skeleton). The algoritmh check all colored points (will call black), then see if the neighbor’s black and white is under some condition, if the condition mets the black point would be removed (that is become white). Implementation CountNonZero8 (result as A) count how many 1’s in the 8 neighbors. Transitions01 (results as B) count how many 0 to 1 for 8 neighbors. Two pass checking (slightly differnet) A should be 2~6 B should be 1 p2 or p4 or p6 should be 0 (p2, p4, p8 in second pass) p4 or p6 or p8 should be 0 (p2, p6, p8 in second pass) denoting as: ...

July 29, 2026 · 2 min

Building RAG + LLM System

Recently, I have been experimenting with OpenWebUI and trying to understand how it builds a ChatGPT-like interface on top of different language models, tools, RAG pipelines, and memory systems. At first glance, OpenWebUI looks like a frontend chat application. But after digging into it more deeply, I found that the interesting part is not only the UI itself. The real value is how it connects many different components together: OpenAI-compatible models, Anthropic-style models, local LLMs, MCP tools, Python interpreters, image analysis tools, web search, RAG, and its own built-in memory system. ...

May 8, 2026 · 4 min · Dictated, AI-assisted, human-reviewed

Linux Kernel - Part 2

Recently learn more linux (materials will be put here). mmap/brk and memory allocation in C We try to build some run and use strace to analyze all the syscalls, such as execve for execution, brk and mmap for requesting the memory, etc. I notice that for the C malloc and C++ new, we actually call brk or mmap for requesting memory and then the allocator would do memory control, and it will continue requesting memory from OS if the allocator found that the current memory is not enough. ...

April 30, 2026 · 1 min

Image processing - Chaikin Smoothing

Introduction Follow by the RDP algorithm, we imeplemtat hte chakin smoothhing algorithm. Rhe algorithm tries to smooth the curve by adding new points witin each segmetns: For the following example, we can see that we try to split each edge into 3 segements (that is insert 2 points as the red dots), and then tried to connect them. Implementation This function is simple nad the input are a list of points and iteration number. Notice that in each iteration, the number of points would become doubled! ...

April 10, 2026 · 1 min

Linux Kernel - Part 1

Recently start to learn some basic stuffs for linux kernel. I’m nearly new to this since I used to study Ic desing and accelrators and has no experience in OS. The learning materials will be stored in [https://linkingmon.github.io/Algorithm/Linux](this repo). Overall I think this is interesting and I’m starting to bridge the gap for my IC design knowldege and C++ programming knowldege. Linux kernel is mostly written in C, and the interaction can be classified in 4 class: ...

April 6, 2026 · 2 min