New Projects

This month I have started a couple of new projects. It began as one but soon split. The primary project was to make use of a 128x64 I2C OLED display. It has been sitting on the side for a few months after an impulse purchase. It soon became apparent that I needed a way to generate static images for the screen. Although there were programs out there that would convert a bitmap image into the hex code I needed, many were for Windows. So I decided to have a go at converting it myself.

So new to my GitHub repo are:
DN2015-001 – An interface for the SSD1306 OLED Display Driver
DN2015-002 – A bitmap to hex converter for use wwith DN2015-001

Both projects are under development at the moment. How much they develop will depend on how my experimentation with the OLED display goes.


This week whilst thinking about how to represent an idea as a GUI application I ran into the limits of GTK3. I had a look around at matplotlib and pygame as possible work arounds but neither suited what I had in mind. It was then that I discovered Kivy.

Kivy - Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.

Having had a look at some of the demo interfaces that have been created it looks like a really powerful tool. The only limitation appears to be your imagination. In addition the multi-touch aspect is appealing in the longer term as touch interfaces become more prevalent. Once I can get it fully installed/working on Fedora I will be experimenting with it a little.

Portable Apps & Portable Python

So I wanted to do some programming in python whilst at work I could have used my netbook but its size can make it difficult to work on for serious code generation. So my decision was to use Portable Apps from a USB memory stick, Portable Apps does not include Python in its package listing. A quick scout about with a popular search engine showed Portable Python as a solution a current Python version bundled with some handy modules.

The easy bit is to use the Windows installer for each package to install them on the memory stick, Portable Apps installed first and then Portable Python into the root of the drive. Setting up the working environment is the next task. Portable Python includes a couple of Python Shells but what would be better is integrating them into the command line. Installing Command Prompt Portable is the answer, this is a command line on the USB stick to which the batch file it runs at startup can be altered to allow the Python Path to be set.

The batch file is located for me at M:/PortableApps/CommandPromptPortable/Data/Batch/commandprompt.bat.
This is my bat file.

@echo off
set PYTHONHOME=%~d0\PortablePython_1.1_py2.6.1\App\
set PATH=%PATH%;%~d0\PortablePython_1.1_py2.6.1\App\;%~d0\PortablePython_1.1_py2.6.1\App\Scripts;%~d0\Documents
color 07
prompt $p$g
title My Command Prompt

Lines 2 & 3 are the ones I added, they add the path to Python on the USB stick. Note the "%~d0" this picks up the drive letter from the location of the bat file. As its on the memory stick it takes that drive letter. Coding it in this way means that no matter what drive letter the USB stick is given it will always set the correct paths. The paths have basically been set to allow Python access to the Python executable itself, its scripts directory and the Documents location for user scripts.

Code Snippet Plugin

Hopefully by the end of the year I might publish one or two of my scripts/programs on the site. Lines and lines of same colour text is hard to analyse when trying to understand a program, every programmer will use an editor with syntax highlighting given the chance. So to assist those reading code here I have added a handy little plugin called Code Snippet. It supports a wide variety of languages and is easy to use.

So time to test it out. Like all programming textbooks and tutorials it had to be a "Hello World" example, in this case in python.

# Hello World in Python
print "Hello World"


I was hoping to start of 2007 with a post around a week ago, obviously this didn't happen, oops. Now for my usual excuses, I have been away from regular internet access and have been suffering from man-flu. I'm almost better now, so on with the new year.

Rather than the resolutions of previous years, some of which were only listed as filler anyway, I have a few simpler goals.

  1. Contribute more to Open Source Software - It might be writing documentation or code, perhaps just helping other users. It's about time I gave back to the community.
  2. Upgrade my PC - A new TFT & GFX card are on the main list, possibly new case fans and another hard disk as the budget allows.
  3. Finish reading the book I started over a year ago - Once I get through it I can start on something else.

I think that is enough for me to manage, best not to have targets that I'll only fail in meeting. There are a few other things I might try along the way, setting up a wiki, different site content management systems and even finishing my test GUI application written in wxPython.

Well thats how my year should pan out. Time to get on with it I suppose.


For some time now I have been playing about with the Python language. Most of the stuff I have created with it has been rubbish or just little experiments into exploring the language.

I have however created something which somebody might someday might find useful. "What is it?", you ask. It's a command line temperature converter. Not so excited about it now are you?

It has taken many hours of debugging and a complete rewrite to get it ready and I shall release it here soon. I've just got to figure out the licencing issues. It's most likely to be released under the GPL but I'm going to read up on a few others first and make my choice.

I hope to have it on the site sometime over the weekend. But knowing me it could take months.