Most of character displays are based on HD44780 or another compatible controller, e.g. KS0066. The initialization sequence is normally the same for all of them. Unfortunately, OLED character displays are not 100% compatible. They are based on WS0010 (or similar) controller and this controller has a bit different set of commands. I’m not sure about 8-bit mode (never used it), but in 4-bit mode old HD44780 initialization sequence simply does not work for WS0010. Fortunately there is a simple, reliable and universal solution.
I was about to mill some PCBs using my CNC machine when I realized I don’t know anything about my spindle motor. One of the most important things for milling is RPM (revolutions per minute) and this was exactly what I needed. I didn’t want to buy any factory-made RPM meter, so after thinking for about 100ms I came to the quite obvious conclusion - I want to build my own bike. Let’s use STM32F103C8 “Blue Pill” board and libopencm3/make instead of HAL/STM32CubeIDE.
During the FW development for my WlanClock project I decided to replace the default web interface (which is in onion-os package) with my own. onion-os is run by uhttpd, an OpenWRT-specific http server. Unfortunately, uhttpd is not available in Ubuntu, which means I could not run my web interface locally.
There is one snap package, but it does not support cgi-bin folder for backend scripts, which is actively used by onion-os and which I was also hoping to use.
There is also a PPA package with uhttpd port for Ubuntu, but the support was limited to Ubuntu 18.04. In addition, I prefer to use PPA only if there is absolutely no other way to solve the problem. Fortunately, I found a better way to solve the problem and run everything on my laptop.
Quite often standard GUI components are missing some really awesome features or, what makes things even more complicated, these awesome features can not be implemented as a simple extension of the component. For example, imagine a text input field, which has a fixed part at the beginning (let’s call it prefix) and user-editable part at the end. Let’s say, for entering a path in some predefined folder.
Default buttons in WPF have a nice look, but quite a lot of really useful features are missing. For example, the shape of the button, embedded images and so on. In my case the button had to be arrow-shaped and (what is more important) to be clickable only inside of the arrow, therefore I decided to use Path
elements inside of the button. Fortunately the solution I came up with is quite flexible and you can use any elements as a button content:
A small LCD attached to the USB port can be very useful. It can show CPU load, RAM usage, network traffic and so on. Anything you could ever imagine on the separate small display - what could be better? Another good thing is that it is really inexpensive. All you need is a well-known STM32F103 board called “blue pill”, ST7565R-based LCD, several wires and a bit of time.