Welcome to Cowlug

Site Navigation

This site is my personal blog and project repository.

If you are looking for the old Cowichan Valley Linux Users Group, check the side navigation. This site contains links to various projects that I either created or contribute to.

You will also find my Github page and Youtube channel here.

Latest News

PiTFT small displays for Raspberry Pi

This explains what I had to do to get the Adafruit 2.8" Capacitive display working under Debian Stretch on a Raspberry Pi 3.


At this point in time, January 2018, the tutorial on the Adafruit page only deals with getting the displays working under Debian Jessie. Stretch was released on June 17th, 2017 and it's a bit sad that Adafruit has not updated their tutorial.

Here are the steps:
    1. Install Debian Stretch on your Pi3. I used the 2017-08-17 image from downloads.raspberrypi.org.
    2. Make sure everything is up to date with: sudo apt-get update and then sudo apt-get upgrade, then reboot.
    3. Download the adafruit-piftf-helper2.sh script from here, I have a local version here but it may be old now, please check.
    4. Make the script executable -> chmod +x adafruit-pitft-helper2.sh
    5. Now run the script with the sudo command -> sudo ./adafruit-pitft-helper2.sh
    6. and answer the questions


Just picked up one of these microscopes for surface mount work.


  • High quality optical glass elements
  • High definition erect stereo images over a wide field view
  • 2 levels of total magnifications: 10X and 20X
  • Extremely long working distance allows enough operation space
  • 45┬░inclined binocular head
  • Low heat LED light - harmless for touching
  • Additional flexible lamp holder provided for different lighting angles
  • Ocular tube has diopter adjustment
  • Adjustable inter-pupillary distance to fit anyone's eyes
  • Sturdy small metal boom stand
  • Product GS and CE approved
  • Manufacturer in business 30+ years

  • Model: G22C
  • Head: 45┬░Inclined binocular.
  • Eyepieces: wide field WF10X/20 and WF20X/10
  • Objective: 1x
  • Total magnification: 10x & 20x
  • Ocular tube has diopter adjustment ┬▒5dp
  • Interpupillary distance: 2-3/16" ~ 2-15/16"(55~75mm)
  • Working distance: 9 " (230mm)
  • Maximum field of view: 3/4" (20mm)
  • Focus adjustment stroke: 1-3/4" (43mm)
  • LED illumination
  • Power supply: 110V/60Hz (US and Canada)
  • Dimension: 18" x 5-1/8" x 15" (46cm x 13cm x 38cm)
  • Net weight: 14 lb 12oz ( 6.7kg)
  • Shipping weight: 17 lb (8kg)

Hue Commander

I have released a Linux console, python utility, called "huecmdr.py". You can use it to test various aspects of the Philips HUE lighting system. It runs great in any X terminal as well.

It has the following features:

  • Authenticate your computer with the bridge
  • Ask the bridge to search for newly purchased bulbs
  • List all the bulbs known to the bridge
  • Select a bulb for testing
    • Test various values of
    • RGB colours
    • Colour temperature
    • Hue and Saturation
    • Brightness

This utility is a great way of selecting a value to use in your Pytomation Instance file. You can find the Source on the Pytomation github site.


H19term aims to provide close to 100 percent software emulation of the Heathkit H19, also known as Zenith Z19, hardware video terminal.

It currently has the following features:

  • Software bell - User configurable sound
  • Heath mode
  • Ansi mode
  • Supports 25th line.
  • Support all graphics characters.
  • Custom font files for the Linux console, includes Raspberry Pi
  • Serial Port logging.
  • Help files available for ascii characters, CP/M quick help and user manual.
  • Easily configurable in .h19termrc file
  • Colour changing mode for Amber and Green or other colours.
  • Help files directly inside h19term.


H19term is written in Python version 2.7. It won't run in Python 3.x without some modifications.

You will also require the Pyserial package. The Pyserial home page is here if you want more information about it. You can install it with your standard package manager


Download the h19term tarball and follow the instructions in the README file.

The github page is https://github.com/horga83/h19term


See the h19-readme.txt file or go to the github page and scroll down.

As noted before Python should already be installed in most Linux distributions.


Inital Release. Release V1.2

DD for CP/M

DD.COM - CP/M Disk dump

DD.COM is a floppy imaging program for CP/M. It is modelled after the UNIX utility dd. It allows one to make a floppy disk image from an H8D file or to dump the floppy disk to an H8D image.

How it works.

Disk dump for CP/M - Version 1.2 - 2012/01/13...

dd currently only works for reading and writing H8D CP/M disk images to and from an H17, 100k, hard sector diskette drive.

dd - Prints out the help.
dd map - Prints a map of your disk drives - must have floppy inserted.
dd if=<file|drive|port> of=<drive|file|port> - copies images.

dd if=e: of=cpmboot.h8d - Makes image from E: drive called cpmboot.h8d
dd if=mydisk.h8d of=d: - Images D: drive from file mydisk.h8d
dd if=ttys1: of=d: - Images D: drive from serial port using h8clxfer or H89LDR9.


You can download the BDS C source code and the compiled, ready to run versions of DD.COM here.
DD.COM version 1.2 --- DD-1-2.C Source

Older versions

DD.COM version 1.1 --- DD-1-1.C Source


1.0 - 2012/01/01
- Initial version

1.1 - 2012/01/06
- Dig drive letter out of filename so it uses the the correct drive when doing a bisoh(SELDSK).
- Add version and date to help.
- Add drive type to map display.

1.2 - 2012/01/13
- Added serial port support which can be used with Dwight's H89LDR program or h8trans/h8clxfer.

Other Information

Error checking is a little weak yet but I'm working on it, for example, it fails if a diskette isn't inserted in the drive. The program is written in BDS C so it is easy to extend. I will be adding the ability to work with H89LDR so one can use the serial port from a PC as well.

I have only tested this with the following configuration so if it doesn't work for you send me a bug report and I'll fix it. H8 with IDE hard drives A-D and H17 floppy drive E:

Just remember you MUST have a formatted floppy inserted in the drive before you copy.