A Brief Introduction to Analog Signals on Arduino Boards [shorts #5]

Some Arduino boards, like the MKR Vidor 4000, come with built-in digital-to-analog converters (also often simply abbreviated to DACs). With other popular development boards, for example, the Arduino UNO, you’ll have to live with a PWM pseudo-analog output. Or do you? This short article investigates the difference between true analog outputs and PWM pseudo-analog signals, and what you can do to get a true analog signal without having to own one of the more expensive Arduino boards.

Continue reading A Brief Introduction to Analog Signals on Arduino Boards [shorts #5]

How to get the current time from an NTP Server using an Arduino, ESP32, or ESP8266 [shorts #4]

Arduino-based clock projects are a staple in the maker and DIY community, and I’ve built a few ones myself. Such projects typically incorporate a real-time clock (RTC) module that keeps track of the time. However, once the battery on the RTC module runs flat, it forgets the previously set time. Another option involves adding a few push buttons to allow users to set the time. The Arduino itself keeps track of the time as long as it’s plugged into a power supply, and it forgets the settings once you disconnect it from the power source. This short article discusses a third option that allows you to make your clock projects much more user-friendly by automatically setting and adjusting the time when necessary.

Continue reading How to get the current time from an NTP Server using an Arduino, ESP32, or ESP8266 [shorts #4]

A look at various simple dithering algorithms in C++ [shorts #3]

The previous short article investigated a simple method for scaling images using standard C++. In that article, I mentioned that I was working on a way to shrink images for displaying them on the Mac Classic CRT. I also mentioned that, to display the images on the Mac’s CRT, I’d also need to employ a dithering algorithm to prevent losing too much detail. Therefore, this article takes a look at three simple and popular dithering algorithms implemented in C++.

Continue reading A look at various simple dithering algorithms in C++ [shorts #3]

How to resize bitmap images using C++ [shorts #2]

Since 2016, I’ve always returned back to my Macintosh Classic CRT build, constantly trying to refine the project and make it easier to reproduce my results. In my latest attempt, I used a Raspberry Pi to communicate with the monitor. While that method worked like a charm for me, others have reported a few problems they’ve encountered and possible solutions. In my next attempt to finally get this project right, I decided to go down another path. Without going into too much detail here, the new method required me to implement a simple scaling and dithering algorithm in C++. This short article discusses my image scaling solution in C++.

Continue reading How to resize bitmap images using C++ [shorts #2]

Writing a Quick and Easy Thread-Monitor (Watchdog) in Python [shorts #1]

A thread-monitor, often also referred to as a watchdog, is extremely helpful when building multi-threaded and reliable applications. In its simplest form, a watchdog should detect when one or more threads hang or crash, and it should restart the problematic threads if necessary. Depending on your use-case, you could implement this helper in a variety of ways, and you could add many more features such as a heartbeat function that allows each thread to report its progress to the monitor.

Continue reading Writing a Quick and Easy Thread-Monitor (Watchdog) in Python [shorts #1]

Introducing nerdhut.de shorts

As much as I love writing long and detailed articles about complex projects, those take a long time to finish. Unfortunately, I often end up procrastinating a bit more than necessary before I get some articles done. In those longer articles, I often discuss several topics that are relevant but not directly related to the projects themselves. For example, I sometimes discuss a power supply design or a software design pattern in one part of a longer series. However, to prevent me from procrastinating too much and to make it easier for you, new readers, and search engines, I decided to publish at least one short article each week. These shorter articles discuss a single topic in as much detail as needed using as few words as possible. I’ll keep working on longer and more elaborate projects in the meantime!

Continue reading Introducing nerdhut.de shorts