New domain and blog

New domain and blog
Please head over to my new domain to view my blog and current projects

Wednesday, 12 December 2012

Raspberry Pi meets TI LaunchPad MSP430

A few weeks ago I got a TI LaunchPad. With the help of a few tutorials I managed to get the basic input, output and UART working. As most of the examples that I could find are for CCS, I decided to go that route instead of IAR.

My next step was to get my LaunchPad working with my Raspberry Pi via the USB port. After a bit of playing around and installing a few programs, I managed to get it to work. Below is how I got a program  written, compiled and programmed onto the LaunchPad from the Raspberry Pi.

First you have to install a few programs with apt-get.
$sudo apt-get install binutils-msp430
$sudo apt-get install gcc-msp430

$sudo apt-get install msp430mcu

$sudo apt-get install mspdebug

$sudo apt-get install msp430-libc
You might have to run
$sudo apt-get update
before installing the modules.

Next run mspdebug to make sure that there are no errors. If there are no errors type exit to close the debugger.
$sudo mspdebug rf2500
Now that you have everything installed, we need to create the program. I use nano text editor to write my program.
$sudo nano button_ISR.c

This program uses the two LED's and one push button on the LaunchPad. When the button is pressed, an interrupt is generated and then the LED's are toggled.

Close nano saving the changes.

The program then needs to be compiled.
$sudo msp430-gcc -mmcu=msp430g2553 -g -o BUTTON_ISR button_ISR.c
The program should compile without any errors and now you are able to run the debugger.
$sudo mspdebug rf2500
Now program the device
prog BUTTON_ISR
and run the program
run
CTRL+c will stop the program running and exit will close the debugger.

In the next post I will show you how to communicate between the TI LaunchPad and Raspberry Pi via hardware UART and the USB connection.

Greg

Monday, 10 December 2012

Raspberry Pi: Edimax EW-7811UN WiFi Dongle

I recently bought myself an Edimax Wifi dongle to use with my Raspberry Pi. My router is hidden away so I got tired of running a network cable to my Raspberry Pi. The Edimax WiFi dongle was ideal as it is really inexpensive and very small.

It took a while for me to get it set up correctly but eventually I got there. To set up the WiFi connection, you either need a ethernet cable plugged into your Raspberry Pi or you need to connect via the serial port. I connected via the serial port with a FTDI USB to UART converter as this made it much easier to know when the network was connected. 

First of all plug the dongle into one of the USB ports and then reboot.I have not tested this in a USB hub but I am sure it will work the same. To make sure that the dongle has been started, run 
ifconfig
and make sure that wlan0 can be seen.


The next step is to see if your Raspberry Pi can see your wireless network. Run the following command and look for your network.
sudo iwlist wlan0 scan

Under 'Cell 01' I can see my network. Take not of your ESSID and you will also need your network password.

Once you have established that your Raspberry Pi can see your wireless network, you will need to edit the network interfaces file.
sudo nano /etc/network/interfaces
You will need to add the following:
  auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid 'your ESSID'
wpa-psk 'your password'
Your interfaces file should now look like this. Note that I have set a static IP address so if you still use DHCP then you will not need the static IP address settings like I have.


Restart your network connection by running
sudo /etc/init.d.networking restart
and then run
ifconfig
and you should notice an IP address assigned to wlan0.

Now reboot your Raspberry Pi to make sure that everything is working in order.
sudo reboot
If your connection is up and running after the reboot, then you are all set to go wireless.

Greg

Monday, 29 October 2012

Raspberry PI: Bottlepy and Twitter Bootstrap

I have been using my Raspberry Pi for the last few months quite a lot. I am currently working on a temperature/environment monitor that logs temperature, using a DS18B20, and light conditions using an optical sensor. I also have two LED's and two buttons to test basic input and output.

I am developing the application in python using the BottlePy framework. I chose the BottlePy framework as it is a single file that you add, it is very small and it works with Python 3. To control my GPIO's, I am using the Quick2Wire library. To display the temperature data, I am using Google Charts.


This is a picture of the main temperature logging page so far.

However, the purpose of this post is to show how to integrate BottlePy and Bootstrap by Twitter. According to their website, Bootstrap is a "Sleek, intuitive, and powerful front-end framework for faster and easier web development."

To display this, I am going to use my GPIO code which reads buttons and turns on LED's through a webpage. 


To start off we need python file that will run as the server. Below is a snippet of code. The @route shows that this particular function will be run when /gpio us entered into the browser. The webpage is broken up into four sections. The first controls LED 1, the second controls LED 2, the third gets the state of both buttons and light sensor and then the fourth runs a .c file to flash the LED's.


Now we need to have a look at the html code that creates the webpage. By default, Bootstrap works with the user downloading the .css and .js file. These are then statically linked to the html code. When using the BottlePy framework, I haven't found a way to return a webpage template, AND a static file. Therefore I have found a link where the .css and .js files have been hosted. By using these links, you only have access to the default settings, but they are enough for what I am wanting to do.


You have to link to the .js and .css file and then by using certain classes that have been defined and explained on the Bootstrap website, you can get nice looking buttons, navigation bars, and tables. They have many options to use but these are the three that I used here for my site. 

When a button on the website is pressed, it sends the value back to the python function and the python code will perform the task. With the Flash LED button, the python code calls a .c file that has been compiled and runs when called. 

When requesting the button state, I return hex formatted colours to show the state of the buttons. These the colour in the table. 


The red shows that Button 1 has been pressed, the Green shows that Button 2 is not pressed and the Blue shows that the light level is currently light.

There are many different elements that can be added by using the Bootstrap framework. The documentation is really clear and easy to follow with many examples. 

If you get stuck or need some more explanations give me a shout.

Greg

Embedding Gist code into Blogger

I have been playing with my Raspberry Pi and Linux for a few weeks now. Most of the example code has been published on GitHub so I thought I'd give it a go and see what it's all about.

At first I tried to add a repository and then the code snippets. That didn't seem to work as I liked so had a quick look around and saw that you can add a Gist and embed that a lot better. You are also able to link to a raw piece of code. This will hopefully come in handy as I have an idea on how to use this. If it works I will cover it in another post.

All you need to do is create a GitHub account and add a new Gist. Save the Gist get the embedded link.

When you are writing your post, switch to HTML view and paste the script where you want it to appear in your post. You can then switch back to normal view to finish writing the post.

That's about it really. Pretty simple and quick to add code. This is much easier than some of the other methods that I have seen where you have to edit the HTML code of the template with custom java script code.

Greg

Thursday, 27 September 2012

Raspberry Pi: Changing time zones

By default the time zone on the Raspberry Pi image is set the the UK. As there is no RTC on the Raspberry Pi, when ever it is turned on, the time is synced. To set the time zone to your local area, in my case South Africa, the configuration of the tzdata package needs to be changed.

sudo dpkg-reconfigure tzdata


Select your territory.


Then select your local time zone.


As you can see the time zone has now been changed.

Greg

Monday, 10 September 2012

Raspberry Pi: Using Bottlypy to control GPIO

I have been trying for a few days now to get control over the GPIO pins through a webserver. There are a number of tutorials on the web but having very little web programming experience, I struggled to understand and follow the tutorials. 

After working through a number of examples, and not getting what I want, I came across the bottlepy framework. The tutorial on their website and the todo example show enough ways on how to get data to an html page and how to get data from an HTML page.

I have been super busy at work and also trying to get it to work so haven't had a chance yet to do a bit of an explanation on what I did.

To download the files I used click here.

You will need to edit your IP address in the index.py file.

Change to the directory on your Raspberry Pi and run $ python3 index.py

In your browser navigate to IPaddress:8080/index then follow the links. Have a look in index.py to see what pins I have used for the inputs and outputs.

Sorry this is so vague but as soon as I get a chance I will update this post with some more explanations.

Greg

Wednesday, 29 August 2012

Raspberry Pi: GPIO input and output

So I got my Raspberry Pi yesterday and am super excited. I feel like a 10 year old on Christmas morning. I had already loaded the the Raspbian image onto an SD card so as soon as I got it I powered it up and away it ran.

The first thing that I wanted to get working was the GPIO pins. I did a bit of reading and some basic python examples and away I went. Have a look at this website for a very decent crash course in python.

The first thing you need to do is import the GPIO module. This can be installed from here

Then you need to tell python that you are going to use the Raspberry Pi's pin numbers when referencing the ports. The direction of the port is then set.

Once the setup is complete, you can start your code. In my hardware, I connected a push button switch to pin 11 and pin 18 and an LED to pin 3 and pin 5.

import RPi.GPIO as GPIO

#use the Raspberry Pi pin numbers
GPIO.setmode(GPIO.BOARD)

#set the input with pull up control
GPIO.setup(11, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)

#set the output pins
GPIO.setup(3, GPIO.OUT)
GPIO.setup(5, GPIO.OUT)

while 1:
 if GPIO.input(11):
  GPIO.output(3, False)
 else:
  GPIO.output(3, True)

 if GPIO.input(18):
  GPIO.output(5, False)
 else:
  GPIO.output(5, True)

Above is the python code that I used. If you want to download the file you can get it here.

Once you have the file saved, run it in python and by pressing the buttons, the LED's will turn on. To stop the program running, press CTRL+z.

Greg

Friday, 17 August 2012

C# dll for programming Microchip PIC's

In the test development environment, the need often arises where a microcontroller needs to be programmed before the testing can be completed. This can either be done with the development environment or through the command line if this method is provided for by the manufacturer. 

Programming in the IDE is nice and easy, but very slow and needs the user to press the buttons. Often in the test environment, this process needs to be automated with as little user input as possible. Here is where using the command line parameters comes in so handy. You will need this hard-to-find document which outlines the commands to use.

In my application I am programming the PIC18LF26K22 microcontroller from Microchip and using the MPLAB PM3 device programmer. To test the devices I am using LabVIEW and TestStand from National Instruments. 

There is a provision in LabVIEW where you can run command line programs, but I have found this to be a bit slow when interfacing with the PM3 programmer. This made me think of writing a C# dll to perform this task. Now I am no expert at C# programming, but am trying to learn where I can so thought this would be a good exercise. 

I started off be investigating the Process Class and found just what I was looking for. All you need to do is create a new object of the Diagnostics.Process class. Then build the string that you need to send. The make up of this string is explained in pdf attached above. 


public bool LoadImageToPm3(string pm3CmdPath, string port, string hexImagePath)
        {
            System.Diagnostics.Process proc = new System.Diagnostics.Process();
            proc.StartInfo.FileName = pm3CmdPath;
            proc.StartInfo.Arguments = "/" + port + " /P18LF26K22 /F" + '"' + hexImagePath + '"';
            proc.StartInfo.RedirectStandardOutput = true;
            proc.StartInfo.UseShellExecute = false;            
            try
            {
                proc.Start();
                strStandardOutput = proc.StandardOutput.ReadToEnd();
                proc.WaitForExit();
                int iSuccessful = strStandardOutput.IndexOf("Operation Succeeded");
                if (iSuccessful > 0)
                {
                    return true;
                }
                else 
                {
                    return false;
                }
            }
            catch (SystemException e)
            {
                return false;
            }
        }

This is an example of how to load an image onto the PM3. I build the string and then once I start the process, I read the standard output to make sure the the operation was successful.

The dll I wrote can handle loading an image to the programmer, program a device where the image is already on the programmer and erase the device. There are many other processes that can be performed but for the production testing that I am doing, this is all I need.

In the project attached, I also wrote a simple form application and a TestStand sequence to test the dll. You can find those files here.

By using a dll, I decreased my programming time from 60sec in LabVIEW to 15sec. When the device being tested only takes 30sec to test, an extra 45sec programming time is huge.

I hope this helps and if you need anything explained further, please leave a comment and I will try help where I can.

Greg

Tuesday, 17 July 2012

LabVIEW: Simulating keyboard events

Another useful trick in LabVIEW using the user32.dll is to simulate keys being pressed on the keyboard. I haven't come across the need very often, however when using console applications, it can be necessary.

I ran into this problem while running a console application that runs a GPS simulator. Getting the application to run was easy and when the simulated trip is complete, the console closes automatically. The problem came in when I wanted to stop the controlling LabVIEW application. When I stopped the LabVIEW application and if the console was still running, I needed to close it and wanted to do it all in one step, instead of forcing the user to stop the LabVIEW application AND close the console window.

After some research I found out that the user32.dll has a keyboard event method so I decided to use that. I first had to make the console window active, find out how here, and then I would run this application as a sub-vi to simulate a Ctrl+C which was needed to stop the GPS simulation and close the console. 


What happens is that the two integers need to be passed to the dll. The first element is the decimal representation of the ASCII character that needs to be simulated and the second is what motion the button makes.

EG: 162 is represents the Ctrl key and 67 is the decimal representation for the ASCII uppercase C. The second integer that is passed to the dll is used to decide what the button is doing. 0 Simulates that the button is being pressed and 2 simulates that the button is being released.

Therefore, by writing each cluster to the dll in a for loop with 50ms delay between loops, Ctrl+C is written to the active console window which will stop the GPS simulation and close the window.

To download the example VI, use this link.

Greg

Friday, 13 July 2012

LabVIEW: Making a window active

A small issue that I have been trying to resolve is when a LabVIEW application runs and multiple windows are open, the need is often there to bring a window to the front as some stages of the application. 

Now I am sure there are many ways to perform this task, but the easiest and most reliable way that I found is to use the user32.dll that is part of the windows installation. This dll is easily accessed by using Call Library Function Node. This can be found in Connectivity >> Libraries & Executables.


The three methods that are used are FindWindowA, SetForegroundWindow and ShowWindow. By wiring these us and adding the correct window name that you want to bring forward, when the program is run whatever window name is selected will be brought to the front. 

There are many other tasks that can be performed by using the user32.dll. I have used it in a few other places in my programs and will add some more posts in the future of where it can be used.

To download the example VI, use this link.

Greg

Thursday, 12 July 2012

2W red LED bicycle light update

If you missed the first post about my modified bicycle light, take a look here

So I used my light last weeks at #moonlightmass and it was super cool. I got a few comments about how bright it is and I suppose it's not a great idea to use this light in a crowd of people. To be seen out on the road by cars, this light is great.


Here is a picture of the modified light mounted on the seat post with the battery pack and controller mounted in a box under the saddle.


Here is a quick video of the light in action.

There are still a few software changes that I need to do like complete the low battery indicator and I also want to add a few more light functions, but that will come when I get a chance.

Greg

Wednesday, 4 July 2012

#moonlightmass in Cape Town

What started in January 2012 as a social experiment over Twitter, has now become the place to be once a month when the moon is full. Meeting on every full moon under the round about in Green Point, the ride goes past the amazing Cape Town Stadium and onto Sea Point promenade. 



The ride then follows the promenade and past the Sea Point library up onto Main Road. Making its way back to the city center, the ride then turns up Long Street. For me this was the best part of the ride because how often do you see so many people riding their bikes up one of the busiest roads in town with zero cars.

At the top of Long Street the ride then crosses over and makes its way down Bree Street where it finishes at Greenmarket Square.

View #moonlightmass route in a larger map

So that is the route that the ride takes. It's a great concept and it was super to see the police out to help with the traffic control. Big up to the City of Cape Town for helping out. I can only imagine that next month is going to be even bigger so looking forward to that. 

Keep an eye on the #moonlightmass website for the next event, it's going to be large.

Greg

Tuesday, 3 July 2012

Bicycle light using two 1W red LED's

I bought a 1200 lumen light the other day so that I can cycle before and after work when it is still dark. It works really well to light my way, but I also wanted a decent back light. After all, the cars generally come from behind and need to see you.

Instead of simply buying one, I decided to make one by recycling an old bicycle light that I had lying around and use two 1W red LED's that I have also had for a while and never used.

The first hurdle I had to overcome was to design a power supply capable of delivering at least 350mA and one that could supply 6.4V, enough for two LED's. I also wanted to use at the most, two 1.2V NiMH batteries.

The next choice I had to make was what controller I wanted to use. I settled on a small, low cost micro controller. I also decided to run the entire circuit off 5V. This would slightly under drive the LED's, but would safely power the micro without using two power supplies.

For the power supply, I went with the LM2623 which is capable of supplying 2A with an input of as low as 0.8V.


For the micro controller I went with the PIC12F615 which has an internal nMCLR pull up and an internal 4MHz oscillator which keeps the pin count low.


To drive the 1W LED's, I am using a BD139 transistor. I am driving it just below its limit, but I had a few lying around so just used one. I am using a PWM signal of 1KHz and the LED's are on for 50ms and then off for 250ms. At the moment I only have one setting but I plan to add more in my next version, different flash rates and solid on.

I use one of the analog inputs to measure the battery voltage. By doing this I can turn on the 3mm LED when the battery voltage goes below 2V. This means that I won't run the battery's too flat and damage them.

The battery's and controller are housed in a plastic box which I have tied neatly under my saddle and the light is attached to my seat post. 

At the moment this is my prototype which works, but isn't 100% complete. I still need to tweak the part of the program that measures the battery voltage and I also want to play around with the current limiting resistor so that I can get the max brightness out of the 1W LED's. I also have to test how long the circuit will run on two AA battery's.

I will be testing it tonight at Cape Town's #moonlightmass to see how it performs. I will also get some pictures or videos and put them in a follow-up post. 

If you want the DesignSpark schematic and the micro controller code, use this link.

Greg

Thursday, 28 June 2012

Adding source code to Blogger

I have been trying for quite some time to add source code to my blog. Just copying and pasting the code works fine, but there is no proper formatting or colours used in normal source code editors. After browsing the internet and reading many examples, I finally came across this website that helped me get it done.

I have used the SyntaxHighlighter script and from what I have seen, this seems to be the most used method. It supports a number of different programming languages and once set up, very easy to implement.

Please back up your blog before trying this as you need to edit the html template. From your Dashboard, navigate to Template, and then select Edit HTML. A warming will pop up so select Proceed. The HTML template will now be displayed.

Navigate down in the template to find </head>
Copy the code below and paste it above </head>


Preview your template to ensure that it still looks ok. If all is fine, then save the template and close the editor.

The next step is to make the script work. You do this by using the <pre> and </pre> HTML tag. In between these tags is where you add your code. You also need to specify which script to use depending on what language your source code is in. Here is the example I used to display C# source code.

private void UpdateCounter()
{
if (iCounter.Value < 50000)
{ iCounter.Value++;
{
} else iCounter.Value = 1; } }

You need to add the tags and code in the HTML editor. Once the source code has been added, then you can go back the the text editor to complete the post.

That's about it. Once the template has been edited and your set up is correct, adding source code it pretty easy.

Greg

Wednesday, 20 June 2012

Cycling: Making friends with Kloof Nek

A few years ago when I was training for IRONMAN South Africa I used to do this ride and some at least three times a week before work. Back then I was fit and was training with a good group of guys.

Now after a few years with not much cycling, I decided to give Kloof Nek a try. For those that don't know, Kloof Nek is the road between Cape Town and Camps Bay. It's a relatively short climb, but gets rather steep in places and if you not ready for it, it can be quite tough. According to Google Earth, it is 4km long with a maximum elevation of 13% and an elevation gain of 235m. 
The view from the top is magnificent. To make it a bit of a longer climb, you can either turn right at the top and cycle to the top of Signal Hill or turn left and cycle along the face of Table Mountain past the cable way.

The ride down into Camps Bay and back along the coast makes the tough climb well worth it. 

Give this route a go and if you feeling energetic, cycle Kloof Nek, carry on and go over Suikerbossie into Hout Bay and then climb to the top of Chapmans Peak. The views from along the road and the top of all the climbs are amazing. When I'm fitter I will be doing that route and will get it up here. 

To download the Google Earth file, use this link.

Greg

Monday, 18 June 2012

LabVIEW: Event Structure vs While Loop

When I started working with Event Structures in LabVIEW, I wondered what the difference was in terms of CPU usage. In a small program, managing efficiency might not be an issue but in a large testing environment where many processes need to be performed, the need for managing efficiency becomes quite important.

To test the difference in CPU usage between using the standard While Loop, which can get messy very quickly and the Event Structure, I wrote a simple program. The While Loop and Event Structure options are placed in different cases which is selected before the program is run. Both options monitor two buttons, display a message when either button is pressed and has a counter which shows how many times the loop is run.


The Event Structure monitors two buttons and displays a message for each. 


The While Loop also monitors two buttons but as it can be seen from the front panel above, it is quite a bit more messy than the Event Structure. If any more button or inputs need to be monitored, this method can quite easily get out of hand.


Here is the CPU monitor comparison of the two options being run. On the left is the Event Structure only using 5% and on the right is the While Loop which is using 30%. There are ways to slow the While Loop down like adding a loop delay but I wanted to show the extremes.

I hope this helps and can provide some display on the different ways to do a similar process.

To download the example VI, use this link.

Greg

Thursday, 24 May 2012

LabVIEW: Creating custom buttons

It's been something that I have been thinking about for a while but never really got round to trying. Creating custom buttons have a number of different applications and they are really easy to make.

To start off, you either need to decide if you want a button with an emblem (same image for true and false) or if you want a button that has a different image for true and false. You also need to find the images that you want displayed on the buttons. A good place to start is a clipart website like this one.


Download the images and then resize them. I use an image size of about 60px x 60px.
  • Open the LabVIEW start up window and under New, select More
  • Under Other Files, select Custom Control
  • We now need to place a button so we can change what it looks like
  • Place a button control onto the front panel
  • Select your first image by navigating to Edit >> Import Picture to Clipboard
  • Right click on the button and select Import Picture from Clipboard >> True/False/Decal
  • True will display the picture when the button is in a true state. False will display the picture when the button is in a false state. Decal will embed the picture for all states.
  • Do the same process to attach the next image for the other state
  • Save the control and then use it in a normal VI
That's about it. Pretty simple to create custom controls.

To download the example control, use this link.

Greg

Friday, 11 May 2012

LabVIEW: Simple event structure

I searched everywhere to get an example or some help of a simple event structure and a state machine working together. I have used state machines extensively and really like the way they work but never tried implementing an event structure into it.

Here is a very simple state machine which runs through an initialising state and then sits in a running state. The event structure is in the running state and monitors the two button for a state change and also the close window button. 

Initialise button: Takes the program back into the Initialising state.
Stop button: Takes the program into the Stop state and then stops the program.
Close Window: Show a message that the program must first be stopped before it can be closed. Then takes the program into the CloseWindow state and then back to the Running state.


I am sure there are much better ways to perform this task so if you have any tips please leave me a comment. As soon as I find a more efficient process, I will be sure to update this post and program.

To download the example VI, use this link.

Greg

Tuesday, 8 May 2012

The best thing to do for our health

Watch the video and find out how easy it is to get healthy and live a longer, happier life.



Go for a walk today and see how it feels. 

Greg

Thursday, 3 May 2012

Specsavers Ironman South Africa

One day I will be back on the start line getting ready to run onto the ocean for what is called an IRONMAN triathlon. Until then I will just watch the race day video and get inspired by all those survivors.



Greg

LabVIEW: Sending an email to a gmail account

Logging to a database in a LabVIEW application has its uses, however sending test results as an email can also be very useful. Sending an email to a Google (gmail) account is relatively simple using .NET constructors.


By using the various constructors, an email can be sent using an existing gmail account. (Click here to get a gmail account.) The email can be sent to a recipient, carbon copied to a recipient and even have an attachment added. 

By using the VI as part of an application, any string can be written and sent as an email. I used this VI to email results for an automated test so that I could monitor its progress after each test was completed. Logging to a database is also very effective but sometimes it's easier to access an email account over accessing a results database.

To download the example VI, use this link.

Greg

LabVIEW: Reinitialise all indicators

There are times in a LabVIEW program that where you need to reinitialise all the front panel indicators and controls to their respective default values. I like to do this as the first step before the VI is run so that I know that everything is in a default state.

This can be done by using a property node for each indicator or control. With large programs this can become very tedious and add a significant amount of unwanted clutter.

There is another, easy way to accomplish this and that is to use a reference to the current vi and an invoke node. 


By adding this VI at the start of your program, all the indicators and controls are initialised to their default values. 

To download the example VI, use this link.

Greg


Chainring BCD sizing


I have wondered for a while how chainrings are sized. Even though I have been riding for years, I have never needed to replace one so I never realised how many different sizes and shapes there are.
 The number of teeth on the chainring and the number of bolts (4 or 5) is pretty easy to choose. This depends on what type of riding you doing and what type of cranks you have. The measurement that isn’t so easy is the Bolt Circle Diameter, otherwise known as the BCD, of the chainring.
The size that you need depends on the groupset and is sometimes written on the face of the chainring. If it is not, then the table below will help you determine what size chainring you need.


 Using a tape measure, measure the distance between the center of 2 adjacent holes. (See the picture) Then use that measurement to determine what size chainring you need depending on if you have a 4 or 5 hole crank.


 I hope this helps prevent multiple trips to the bikeshop with the incorrect chainring size.

Greg

Recipe: Tomato Bredie


One of my favourite meals is tomato bredie (stew). My mom used to make this from time-to-time and I used to love it. When I left home and moved overseas I longed to have a good tomato bredie so got my mom to show me what to do when she came for a visit. This is a perfect dish for any time of the year, but especially in winter to keep warm.

What you will need:

1kg lamb knuckles, stewing lamb, mutton (try not to get too small pieces as they will cook away)

2 onions
1 garlic clove
500ml beef stock
2 x 400g tins of chopped tomatoes
60ml tomato paste
4-5 large potatoes peeled and cut into cubes
½ teaspoon chilli powder
Salt and pepper to taste (I add lots of ground black pepper)

What to do:

In a large pot, brown the meat in some more olive oil. Then remove the meat from the pot and set aside.
Chop the onions and garlic and sauté in the same pot until cooked.
Add the tomato paste, chilli, salt and pepper to the stock and stir well.
Peel potatoes and cut into cubes
To the onions, add the meat, stock, chopped tinned tomatoes and potatoes.
Cover and once boiling, turn the heat down low and allow to simmer for about 90min or until the potatoes are soft.

Thicken with some corn floor if you prefer a thicker sauce. (I mix 2 teaspoons of corn floor with some water and add after about 45min)
Serve with white rice or couscous.


Tomato bredie freezes well and normally tastes better the next day once all the flavours have been absorbed into the meat and potatoes.
I hope you enjoy this meal as much as I do.
Greg

Monday, 6 February 2012

Blaauwklippen loop, Stellenbosch

Starting at the Pick 'n Pay center along the R44, run towards Strand. Just after the caravan park turn left and the road becomes a dirt road. Follow the road past the turn off to Waterford Wine Estate where the road becomes tar.

The road carries on until you reach the R44 at the Engen garage where you turn left back towards the Pick 'n Pay center.

Besides the short section while running alone the R44, the road is very quiet and the gravel section is also in very good condition.