I have created an analog clock for my app using the Lazarus and the BGRABitmap methods and I thought I should share. I have created a thread on the Lazarus forum about this.

Analog Clock

Basically, two bgrabitmap objects are created. First the clock face and frame on start up and second the moving parts on a timer event. Then the two images are combined to create the complete clock. On the next timer event, moving part are erased and recreated and combined with the clock face again. The clock body and face will be redrawn when the form is resized.

Read the rest of this entry »

Comments No Comments »


I just started playing around with python and I like what I see so far. I just completed an application in Lazarus that extracts data from the KML file generated by an application on my Blackberry. It surprised me that it seemed to take me a few hours to achieve what I feel have taken longer to do in Pascal.

SO, I thought I will post the python code here. As I am learning python, I opted not to use any XML libraries as I need to get to know the basic python code first. The script has no GUI. This will be the next thing to learn of course.

Read the rest of this entry »

Comments No Comments »


I do a lot of business trips with my personal vehicle. I need to supply a vehicle log book for tax purposes. I downloaded an app for my Blackberry that uses the built in GPS to track the path traveled o a KML file. The BB app works very well except that it hase no export function to a CSV for example. I wrote an application in Lazarus that extract the data from the KML file to a CSV file that I can use as a vehicle trip log for tax purposes.

The KML Data Viewer app extracts the following datafrom the file:

  • Begin address
  • End address
  • Start Time
  • Distance travelled

Blackberry app can be at the Blackberry Application World

Read the rest of this entry »

Comments 2 Comments »


I need an applicaton that can extract data from a GPS trip logger on my Blackberry. The logger save data in the KML format.

The KML file contains the following data:

  • Begin time and date
  • End time and date
  • tracked path containing waypoints in lat long format

For my app I need to get the begin and start addres. This is where this demo comes in. I use the Google Maps API to reverse geolocate the address for me from the entered lat long values.

I use the lNet component suite as it has a HTTP client component that can be used to write the API as a URI to and then read the result back into a text based buffer. The results can be parsed to get the formatted address (available as part of the results) or a more complete address can be built up from the received data.

Simple Reverse Geocoding (rev 1.0)
Downloaded 1186 times

The code is pretty simple and self explanatory.

Stay tuned for a more complete application that batch extracts data from multiple KML files.

The same API can also be used to load a map for example, making the software more user friendly.

Comments 2 Comments »

To learn how to use the Micro810 PLC, I wrote an application to control my pool pump from the PLC. The unit has a built in RTC and this can used to switch the pool on and off to user defined times. The user will be able enter On and Off times using the LCD and key pad. The complete controller unit will have a selector switch with following positions:

  • On -> switches the output On irrespective of the time settings
  • Off -> keeps the output Off irrespective of the time settings
  • Auto -> output goes on and off according to programmed times

Compared to a discrete system using buttons and timer, if the PLC breaks, it is a lot more expensive than a timer to replace. On the other hand, the plc system is a lot smaller.

I have posted the application for anyone interested.

The code is not optimised as I am still learning PLC’s and ladder in general, but everything works.

An annoying feature of the device, is that you have to enable the key button by browsing to the LCD setup in advanced settings and enable P-Button after every download.

Read the rest of this entry »

Comments 2 Comments »


I recently acquired the Micro810 starter kit from Allen Bradley. This a review of my experience so far.

I come from an electrical metering and electronic design background and I am in no sense a PLC programmer. I started working as an electrical service engineer in the fast moving consumer goods (FMCG) industry 3 years ago and got my first exposure to PLC. I do fault finding and maintenance work on the MicroLogix range of Allen Bradley PLC and have some idea how these work.

As I am working with PLC’s I needed to gain exposure. PLC’s are too expensive to buy for once off training and courses are expensive. Recently a supplier mentioned the Micro810 starter kit and this is not bad at R850 ($105).

The kit includes the following:

  • LCD and Key pad
  • 8 digital inputs
  • 4 analog inputs
  • 4 relay outputs
  • 4 x button PCB
  • CD brochure
  • CD with the free version Connected Components Workbench (CCW)
  • USB cable and adaptor

Read the rest of this entry »

Comments 6 Comments »

I recently decided to try out Designspark, a free electronics design program sponsored by RS Components.


Previously I have worked in PCad, Eagle CAD and tinkered a bit with gEDA on my Linux machine.

To start off I thought I will do a design for a wireless transmitter using the MICRF113 chip from Micrel.

Read the rest of this entry »

Comments No Comments »


I recently converted to Lazarus from Delphi. Lazarus is an IDE that includes the Free Pascal Compiler and a graphical user interface that looks similar to the Delphi 5 environment. The program has great features of which the Open Source License it the best.

I also discovered the BGRABitmap library. This is a graphics library used to draw gradients and shapes and includes controls like some buttons and a progress bar. These can be ‘skinned’ to enable your application to have a Flash Player theme for example. The buttons has a lot of features with no editor and my first Lazarus application was to create Buttons, a button ‘skin’ editor. This application enables saving the button properties to file and to load to edit.

Next I will explain (nothing to explain really) the method I used to save the button to file the quick and dirty way, streaming.

Read the rest of this entry »

Technorati Tags: , ,

Comments Comments Off

Introduction to the BGRA Button Designer

I have recently started with Lazarus after working with Delphi 2007. I have also discovered the BGRA graphics library and liked it a lot.

I have just completed my first app using lazarus and the BGRA library. It is GUI based app to design buttons using BGRA and their button control. The values entered into the program then be used in the pascal code to skin the button. A future improvement is to generate the pascal code.

Please try the app (it is virus, malware etc free) and give feedback and suggestions please.

The source is still in the quick and dirty phase and will be available for download shortly.

Please leave a comment at the bottom of the page if you would like to receive feedback on updates.

Read the rest of this entry »

Comments 6 Comments »

According to Internet World Stats there are more than 2 bil internet users in the world. No doubt it is a good idea for any business owner, big or small, to have a website considering the exposure you can gain. This article will explain the process of setting up a website or blog based on the WordPress framework.

The logo of the blogging software WordPress.

Image via Wikipedia

I am a big WordPress fan due to its ease of use. I have played around with Drupal and Joomla but in my opinion WordPress is the easiest of the lot. They have a big support base with frequent framework updates and thousands of free SEO friendly themes and plug-ins that can change the framework from a blog setup to e-commerce setup with a few clicks.

Read the rest of this entry »


Technorati Tags: , , , ,

Comments 1 Comment »