Programming Index
May 16, 2018

Internet Radio Player based on MOC

Presenting an internet radio player for Linux based on the Music On Console player. It is a test bed for an Internet radio player to be built around a Raspberry Pi to be connected to an older sound system. The source code is available. The application written with Lazarus, the open source Free Pascal RAD IDE. [...more]

April 9, 2018

CSS float and clear attributes and clearfix

In HTML, floating areas in a <div> type block do not change the size of the block. This can result in a local alignment problem. There are more or less well-known solutions, this is about some of them [...more]

April 6, 2018

Using Multiple Search Engines From A Single HTML Form

Just two days ago, I removed the search bar from the top of every page on this site. I wanted to have more than one search engine but I did not have a compact way to do it. Then I thought of an input box for the search words followed by three buttons for each of the search engines [...more]

March 2, 2018

The cthreads Unit in Linux (Free Pascal)

Pursuant to the previous post, this is another short note about enabling threads in Free Pascal programs for the Unix/Linux environment. [...more]

February 24, 2018

Running a Process in a Thread (Free Pascal)

Another Free Pascal short note about running a process in a thread. In it I show how the aplay utility can be launched to play a wav file in a thread so that the application GUI remains responsive and it becomes possible to stop aplay at any time [...more]

February 23, 2018

Installing and Updating Free Pascal and Lazarus with fcpupdeluxe

This is just a short note about using FCPUpdeluxe to upgrade or install the Free Pascal Compiler and Lazarus IDE and LCL on a Linux system. I assume that it would be mostly the same on a Windows system. [...more]

February 17, 2018

The Yahoo! Weather API with Free Pascal

Mea culpa for a very local solution to getting weather reports in a previous post which would have been of interest to only a few. Here is a solution using Yahoo! YQL queries with a potentially wider audiance [...more]

December 14, 2017

Python 3 virtual environments

As I have been trying to learn Python by dabbling with voice recognition and home automation project, it has become obvious that I had to familiarize myself with virtual Python environments. The principle is not difficult, but I ran into practical problems. This post, more than two weeks in the writing, describes how I now manage and use virtual environments on three different Debian based Linux distributions. [...more]

October 17, 2017


Since the end of May, the company hosting my website has been providing SSL certificates (OpenSSL from The site can be browsed securily with the HTTPS protocol. That should inspire confidence; the little green padlock is now visible in the address bar. There was a catch, the style files and images were no longer found when viewing files in sub-directories. A solution had to be found. [...more (in French)]

September 11, 2017

A Better ESP8266 Loop Watchdog and Better Recovery

This post continues with improvements to the third loop watchdog introduced in the previous post. But most importantly, it provide a useful technique to recover in a hands-off way to watchdog timeouts and exceptions. [...more]

August 28, 2017

Arduino Sketch Managed ESP8266 Watchdog

Adding a third watchdog is a good idea for some ESP8266/Arduino based projects. That's because it is very easy to write code that feeds the built-in watchdogs but nevertheless goes off the deep end. The task of this watchdog is to ensure that the Arduino loop is executed regularly. [...more]

August 26, 2017
Updated: August 27, 2017

ESP8266 Watchdogs in Arduino

While the hardware and software watchdog timers of the ESP8266 are essential, they are not sufficient to ensure the kind of reliability needed in an IoT device. In a future post, I will discuss how to implement yet a third watchdog to further improve the dependability of the firmware programmed into this chip. In the mean time, I thought it would be useful to discuss watchdogs in general and to delve into some of the details of the ESP8266 watchdogs. [...more]

March 14, 2017

Translating Console Applications in Free Pascal

Lately, I noticed that DefaultTranslator and LCLTranslator cannot be used to select a language in a console applications. They pull in the complete LCL package and the SetDefaultLang wants to translate all of the forms in the project even as there are none. So I decided to rip out the form updating code in LCLTranslator and to save that modified version in a unit called UnitTranslator [...more].

I found this out when looking at the tcalc demonstration program for my simple parser. I have updated that project accordingly [...more]

January 30, 2017

NodeMCU, MQTT and Domoticz - part 2

This post continues the exploration of NodeMCU, MQTT and Domoticz begun on the 15th and 17th of January. The subject is how to subscribe to MQTT messages in NodeMCU so as to perform a task based on messages published by other devices to the MQTT broker. In particular a virtual switch in the home automation software will set the WeMos D1 Mini LED on or off [...more]

January 21, 2017

Wemos D1 mini and NodeMCU - reworked

The January 15th post has been reworked slightly to better explain the work flow when using NodeMCU with command line tools. In particular, setting the baud rate correctly makes for a smoother experience [...more]

January 17, 2017

NodeMCU, MQTT and Domoticz - part 1

This post continues with the previous one. In it I show how to establish a WiFi connection and how to update a device (a temperature sensor) in the home automation software Domoticz. This is done in two ways: using an MQTT broker and directly using an HTTP request [...more]

January 15, 2017

Wemos D1 mini and NodeMCU

When I purchased my first ITEAD Sonoff WiFi switches, I also got a Wemos D1 mini board. I thought using a ESP8266 development kit would be a good way to prepare for hacking the switches. In this post, I relate how I learned to program the ESP8266 using a tool chain made up of NodeMCU firmware and Python command line utilies: esptool, nodemcu-uploader and miniterm. [...more]

August 30, 2016

Conversion of measurement units

Free Pascal's run time library contains Delphi compatible units ConvUtils and StdConvs. Unfortunately, both units contain a few errors. Lately, I have attempted to fix the code and hope to eventually submit these corrections for inclusion in a future version of the compiler [...more]

July 13, 2016

One Pass Mathematical Parser

While porting code to FreePascal/Lazarus, I have made some changes changes to the mathematical expression parser I initially wrote in Delphi. The one pass parser for Free Pascal is complete, so is the documentation [...more]

July 6, 2016

List Separator in Linux

There is no default list separator in Linux. In that case, what value does Free Pascal assign at startup to the ListSeparator field of the DefaultFormatSettings? The short answer is that the list separator is the comma ‘,’ as used in the USA and it is not adjusted according to the user’s locale. That is not always acceptable []

April 4, 2016

Free Pascal/Lazarus gotchas

After running into yet another small difference between Free Pascal/Lazarus and Delphi, I decided to write up a few of these gotcha's. They have to do with assigning procedural types and event handlers, calling a function without parameters using a procedural variable, and the rather similar problem of recursion of functions without parameters. I have also covered the creation of Debug and Release build modes and the addition of DEBUG and RELEASE symbols in the appropriate build mode [...more].

January 27, 2016

Sliderbars - Part 2

Two new components have been added to the package discussed on the 24th. The first, called TSliderPlane, is a two-dimensional version of TSliderBar. The second component is called TColorPlane. It is very specialized, showing any plane in the RGB cube. It can be used to build a colour selector with just two or three lines of code. [...more]

January 24, 2016

First Lazarus component: sliderbars

My first components for Lazarus, slider bars, , are now available. They can be used to make an RGB colour selector dialogue. See how simple it can be in the second demonstration program included in the archive. [...more]

This page lists posts published in the last two years on the subject of programming. Archives contains links to all the pages published on this site. It is also possible to do a searches limited to the content of this site with the search box at the top of all pages.