Author Archives: admin

New Section Indexes

New for 2016: Index Page Updates

The website Index Pages have now been extended to cover all of the major sections, Resources, Blog, Projects and Photos and can be found on the drop-down menu under each section.

The Index pages can be found here:
Continue reading

2015 Some of my Favourite Things

And some of my favourite things in 2015, again (as last year), presented in no particular order other than that in which I thought them up. These are the things that have influenced me this year . . . .

  1. CodeBugCB Detail
    In early October I bought a CodeBug, and you can read about my first week’s experience here. I have since used the CodeBug in a session to make a Fruit Keyboard, following the simple on-line tutorial. You can read about that experience here.
    So why is CodeBug on my 2015 list?
    Well, it is a complete environment. It is very easy to get going and achieve something. Google’s Blockly, which is used for the programming language, is very easy to learn, and use, and it is fun.
    And the CodeBug has provided me with the most immediate and tactile feedback from any computer programming experience, and I have been coding a long time.
    I currently have a CodeBug and Colour Tail attached to a Raspberry Pi and these are providing our Christmas lights this year 🙂 Read more and watch a video of the Christmas lights here.

  2. Raspberry Pi 2

    Raspberry Pi 2

    Raspberry Pi 2
    The first thing I did when I got my Raspberry Pi 2 was write a short program to count up to 100 million. A completely unscientific performance test. Details can be found here.The speed increase from a single to a quad core processor, the extra memory (512mb to 1024mb), and all round smoothness, makes the Raspberry Pi 2 a joy to use.  Yes it is 18 times slower than my desktop, an intel i3770K, but it doesn’t feel much slower in many things. And in all things Pi it is much quicker, like making things and plugging them into the GPIO pins.
    I have a Pi 2 dedicated as a home web server. This is connected to the new 7″ touch screen which has significantly reduced the keyboard footprint on my desktop.
    We also have Jesse, the latest version of the operating system, which is another improvement. And this month, December, the Pi Zero has arrived. This has caused a lot of controversy. A genuine £4 computer. Yes, it is a compromise, but at £4, one that is very easy to live with, and has amazing maker or tinkerer potential. I expect to build a few devices based around this in the new year.

    MQTT is a fantastically simple M2M (machine to machine) connectivity protocol, used as an extremely lightweight publish / subscribe messaging transport. It is ideal for Internet of Things (IOT) devices. I have been using an MQTT service to connect to and remotely control some of my IOT devices.
    I have been building some Home Automation devices; temperature sensors, power switches, intruder sensors, etc,  and MQTT is proving an excellent way of messaging between devices.
    Using a Raspberry Pi I was able to generate a maximum of around 3,000 messages a minute, both sent and received. [The actual ‘in-use‘ message volumes generated by the devices are in the 10s (tens) per hour.]
    The capability is fantastic. To do this on the internet 10 years ago was hard work. 20 years ago it was science-fiction. Now it is becoming part of the IOT tool-kit.

  4. Bugs in Windows 10Win10
    Hands up if you are using Windows 10 and haven’t yet found a bug?  Don’t worry, you soon will.
    Now, don’t get me wrong, I like Windows 10. I absolutely hated Win 8.0 and the ineffectual patch 8.1. I still look back fondly to Win 7.0.  But if you are really asking, what was wrong with 98, and 3.11?  Yes, I know these days that computers have much more power, are doing vast amounts more behind the scenes, and are giving us far greater capabilities. But if Hubble can still run on 1980s technology; New Horizons went to Pluto on 1990s technology; I am just asking?
    NHZChange though, is inevitable, so onwards we go.
    However, my experience with Windows 10 is that it is quite buggy. Many of the bugs appear to be superficial, but my machine is crashing fairly regularly!  Once or twice a month since deployment in late July. And that isn’t including the nightmare that was the download and install process, which seemed to have just one or two deployment bugs.
    Typical problems include; the need to reboot after automatic updates, having to reinstall manufacturer drivers after automatic updates, the Login screen background changes size from standard full screen to small, the mouse changes from left-hand to right-hand orientation on login screen which can be puzzling until you work out what is going on, Netflix stopped serving higher definition downloads because screen scaling was not minimised – Now this might be a Netflix bug, but hey, its a bug, in Win 10.
    What worries me is that as a software tester I know that if you find bugs in areas of a system, (Updates, Login Screen, Display Scaling) then if you look more deeply, you are likely to find even more. I know there are more bugs in there – I just don’t want to find them!
    If you are having negative thoughts about Win 10, and this is swaying you, then think again. It is way better than 8.0. And Win 10 will only get better as the patches and improvements arrive. Just be prepared for things not being quite as stable as Win 7.0.
    And just why is this a favourite? Well, I am a software tester, and finding bugs is fun 🙂

  5. MS Text To SpeechMSTTT
    Earlier in the year I was writing something, probably a conference abstract, which I wanted to be correct. I know that when you review your own written work you never quite see all of the errors, but I wanted to do a better job. Bouncing around in the back of my mind was the knowledge that windows could do speech recognition, having used this a couple of times but never successfully, and also that it could read text, but I had never used that facility.
    I did a quick search, and found links to MS Text to Speech. Within 2 minutes I had added an icon to the quick access tool bar in MS Word. When I select some text in a word document, and click on the Speak icon, the text is read out to me.

    It was amazing. The previously self-reviewed and ok text, when read back to me, contained three glaring errors . Brilliant I thought. I then added the icon into PowerPoint, Excel, and Outlook. And I now use it almost all of the time to listen to what I have just written.
    Yes, it takes a little bit longer, because I still reread everything I write, but the overhead is worth it for the increase in quality of the output. (And yes, I used it to review this blog entry – that is called dogfooding!)
    A note of caution though: there are one or two amusing pronunciations, but the overall quality of the spoken text is amazingly high. Try it the next time you write an e-mail. You won’t be disappointed.

  6. Tweet Cam

    Tweet Cam

    Making an IOT Device
    I co-presented a workshop and discussion session earlier in the year on Testing the Internet of Things . . . I thought it would be useful to actually have an Internet of Things (IOT) device to help people understand what one was, how to build one, and how to go about testing one.

    So I built a Raspberry Pi Tweet Cam. It took 6 hours from start of build to working device. You can read about the Tweet Cam that I built here.
    I know it looks a bit ‘Heath Robinsonish‘, but that is only because it doesn’t have a fancy case. I wanted to show all of the wires to help the delegates understand how the device had been constructed.
    The only problem that we had, a minor one, was that on day 1 the Internet was not available. We were in a basement room and there was no phone signal.
    No Internet = No Tweet Cam !!!
    It worked perfectly on day 2, was fun to use, and the output can be seen here.

  7. Solar Impulse 2

    SI2 Landing in Hawaii

    Solar Impulse 2
    If you haven’t seen or heard about Solar Impulse 2, the solar powered plane that is flying around the world, then do please check it out at was able to follow much of the non-stop 6 day journey across the Pacific ocean from Japan to Hawaii. I thought the achievement was fantastic, even if it did break the plane, which is currently being repaired for the remainder of the round-the-world journey.
    I was also amazed at the amount of real-time information that was being streamed ‘live‘ from the plane, including HD video.
    I was so influenced it got me thinking about software testing and measures & metrics. As a result I did some work on software testing measures & metrics hierarchies, and ran a workshop at the London Test Management Forum, details of which can be found here.

I hope 2015 also gave you some favourite moments, and that 2016 is equally inspirational.

Interesting error #967

I found an interesting error the other day. Not one I was expecting, and definitely one I hadn’t tested for!

CBCTThis year, in a fit of minimalism our only Christmas decoration (apart from cards) was a CodeBug Colour Tail, tethered to a Raspberry Pi.

The CodeBug played the part of tree and lights.

And I wrote a lights program a day, in python, until I settled upon one that I liked.

on running for longer periods I noticed that the Colour Tail would stop dead. A couple of times the Pi had crashed as well. I obviously had a bug in my python code. I checked it. Rewrote the code. Rebuilt the Pi image. Same problem – random crashes.

It settled into a routine of failing, randomly, any time from a minute after starting, to 12 hours later. But would definitely fail at least once a day, and often more.

That is until 4 days ago. Since when the Colour Tail program will now run all day long, until I close down the Pi.

LED LampSo what has changed? I haven’t altered anything for days. I did though notice, on the first day the program ran error free, that one of our LED ceiling lights had half-blown.

Since then the CodeBug Colour Tail has run perfectly.

I am not saying that the LED light was the cause. It could be that the after 2 weeks of running the Colour Tail has ‘burnt in‘, but it does seem mighty coincidental. Reading about electrical interference from LEDs and noting that there was less than 6’ between bulb and CodeBug / Colour Tail, I concluded that there was a strong possibility I had found the cause.

So I have now added a new item to my ever lengthening ‘Testing Checklist‘. LED Lighting?

Chocolate Testing

Last weekend, as I write, I attended a small and social gathering of testers. On the premise that it was a birthday party, we had planned some ‘fun‘ activities.

We met in an Oxbridge town, and spent the day in the garden room of a pleasant pub, discussing software testing, as you do. Well, more precisely, mostly amusing ourselves with games and activities, with a leaning towards software testing.

PaperPlaneWhilst everyone was gathering, we made paper aeroplanes. This was fun for all but one. Only because when thrown, each plane seemed to deviate towards, and then hit them. And it didn’t seem to matter where the planes were thrown from, or by whom. There must have been a draft? And secretly I think they enjoyed it anyway.

We were told a story. I must admit to being quite shocked by the story 🙂  We all got to play a part, as in the best stories, and it must have been good, because you know when everything else fades out and you only hear the story teller’s voice . . . maybe we were being hypnotised?

Fruit Keyboard

To energise ourselves we made a Fruit Keyboard. We used a CodeBug. Four fruits, from Sainsbury’s. 5 Croc-clip wires. And coded online in Blockly. Yey. It worked. And the squeal when someone touched the orange and the word “Orange” was displayed on the CodeBug 5*5 LED screen was priceless. (I like to collect these ‘Oh Wow‘ magic moments.)

Why should all the fun stuff with computers be for kids? That is my question.

Then the testers amongst us tried to see how many people could be included in the fruit resistance loop. And went on to find a complex timing issue, in a 4 fruit keyboard! But no-one asked why there were only 4 keys on the keyboard? To illustrate its short-comings the next sentence is written on a fruit keyboard. “Apple Orange Pear Banana Banana Banana Pear Orange.

After lunch we played Test Automation Tool Charades – try it sometime. Full credit goes to the chair, who bravely battled through, whilst both sides unashamedly cheated their way forward. To describe the competitive spirit would not do it justice. Let’s just say I ended up on the winning team, without cheating, and I am rubbish at charades. I think this game was actually called ‘Testing the rules‘, and we were unwittingly taking part in an observational study . . . . .

We followed that up with a go at describing test concepts using the Ten Hundred words list #upgoerfive.  If you haven’t heard of this before, it is the concept of describing things only using the 1,000 most popular words in the English language. You will need to check, Up-Goer Five, the permitted words, and the online editor.

These were some of our submissions:

  • Defect Management
    The tracking, control and fixing of problems found in computers.
  • Multiple Condition Coverage
    Way of coming up with seeing many ‘either/or’ cases.

Up Goer Five:

We tried very hard to make this real. The game helps to show things we all know and understand, using different, but easily understood words. I think it helps us see how someone who doesn’t know the idea we are trying to explain will first act. (#UpGoerFive)


We tried very hard to make this meaningful. It is a useful and challenging exercise to try and define things we all know and understand using different and non-technical language. I think it helps us see how someone who doesn’t understand the concept we are trying to explain will initially react.

Draw your own conclusions, but definitely give it a go.

photo 6After Birthday Cake we then undertook Chocolate Testing. The premise was that one person (A) believed that they could tell the difference between ‘good‘ or ‘expensive‘ chocolate and ‘cheap‘ or ‘nasty‘ chocolate. And the other person (B) was convinced that under blind testing, sorry tasting, they would not be able to.

For the test a few bars of chocolate had been procured. The original plan was for 4 – 6 bars. This somehow became 22 bars.

So, 7 people, 22 bars of chocolate, 6 evaluation Criteria, gives nearly 924 tests to perform. And then a master score to be aggregated per person for each chocolate. All tasting to be carried out using a blindfold!  We quickly realised that this wasn’t going to happen in the next 15 minutes, so being good testers we decided to sample. Knowing that the most fun bit was actually blindfolding and spoon feeding the victim(s).

The results. I can officially declare that both A and B can tell the difference between good/expensive chocolate and nasty/cheap chocolate. And that both A and B agree that good chocolate is better than nasty chocolate – no surprise there then? For A this was just confirmation. For B this was genuinely a surprise. B will now be buying nice chocolate!

Please note: This result only holds firm for the limited sample of the 22 chocolate types above.

And on that bombshell the day ended.

GoldFishTo close I will share a note about the room. It was a Garden room. So in effect a brick conservatory. Back into the Pub there was a glass partition, ceiling to floor, with glass doors in it. This was fine when we started as there was no one else in the pub. But come lunchtime, the pub became quite busy. It was like testing in a goldfish bowl. Definitely an experience.





BCS SIGIST Winter Seminar

BCS SIGiSTI will be presenting a session entitled ‘Becoming A Program Test Manager’ in London, on the 2nd December 2015, at the Winter meeting of the BCS SIGIST.

The session will be based on the half-day tutorial Techniques for Successful Program Test Management. A full session abstract can be found in The Tester.

If you are coming along then the Early Bird Discount ends on 4th November, more details can be found here.

CodeBug – Get one now!

A few days ago I was seduced by an offer for a CodeBug.

From the website:

“CodeBug is a cute, programmable and wearable device designed to introduce simple programming and electronic concepts to anyone, at any age. It is easy to program CodeBug using the online interface, which features colourful drag and drop blocks, an in-browser emulator and engaging community features. Create your own games, clothes, robots or whatever other wacky inventions you have in mind!”

It can also connect to a Raspberry Pi. Well how could I resist. All this for only £15. It was too good to be true, so I bought 2. They arrived on Monday. Today is Friday. Here is my:-

CodeBug Diary

CodeBug(s) arrived. Snazzy box. Unwrapped and took a look. Yes, it looks just like the picture. And comes with a USB cable, and a short instruction leaflet.

Visited CodeBug website and followed the get started instructions, watched the short intro video, which at less than 2 minutes shows you in real-time how to write your first CodeBug program, test it, deploy it to your CodeBug and finally run it.

(I didn’t believe the hype. This can’t be true. I tried it. It was!)

Within 10 minutes of opening the box I had a program up and running on the CodeBug. I understood the basics and had experienced a new programming language – Google’s Blocky (Err, actually Blockly – oops. Post updated.)

I thought, 10 minutes. Is that all the fun there is to be had from a CodeBug. Done that. Next.

But, hang on. The CodeBug has two buttons on it, which respond to program control. So my next program included a bit more logic, and used button presses to do different things. Displaying text on the 5*5 LED display. (Amazing to think that a 25 pixel display can actually display text.)

Then I wrote a program to animate a dancing bear. A very simple dancing bear I admit. This time using loops as well as button press logic.

I was beginning to be impressed with this little £15 device. So why not go further. On the website, which is clean easy to use, and has a professional feel to it, there are some learning examples. Next up is a Fruit Keyboard.

Apple Keyboard

I only had apples. So it was going to be a single fruit keyboard. A single key keyboard.

To make this ideally you connect a wire with crocodile clip ends to the CodeBug and the apple. I only had a jumper lead, so I snipped off one end, and wrapped the wire around one of the 4 input / output terminals. Then pushed the pin end of the wire into the apple.

I modded the program to display apple. The tested the program in the on-line emulator, to ensure that it compiled first, and second worked correctly. Happy with a quick test, and desperate to try it in the real world, I downloaded the program to the CodeBug and set it running.

Every time I touched the Apple, “Apple” was displayed on the LED display – scrolling across. This was the most immediate programming feedback I have ever had. I was very impressed at the simplicity of the CodeBug, yet how powerful and flexible it was, combined with a visual programming language and emulator, including cloud storage for all of my CodeBug programs.

This has been well thought through.

But there is more. A code bug can be tethered to Raspberry Pi, and using Python programs running on the Pi you can control the CodeBug. Effectively a program is downloaded to the CodeBug which then works as a client, whilst you run Python programs on your Pi – server, and communicate through the USB cable to your CodeBug. Client Server computing. With a CodeBug. Amazing.

I have to admit here to my first downer with the CodeBug. It plugged it in but it didn’t work. I spent a lot of time trying, but absolutely nothing was happening. I was obviously doing something wrong, but couldn’t work out exactly what. I was using a Motorola LapDock, powering a Model A+ raspberry Pi.

There are 2 ways to tether a CodeBug to a Raspberry Pi. Tethered, and Tethered with I2C, one of the interface standards supported by the Pi. The CodeBug also has expansion pins on its base and can be plugged direct into the GPIO pins on the Pi.

Nothing I tried worked, so I slept on it. Thinking that a bit of rest might help. Before retiring though, I ordered some CR2032 batteries, because the CodeBug can be battery powered so it can work without a computer connection – it really is quite an amazing little device, and I ordered a USB Cable with a switch on it so I didn’t have to keep on plugging it in and out to reset and download programs.

The power of sleep is amazing. If you have a problem, then stepping away from it for a while can sometimes help. Meanwhile in the background your subconscious carries on working on your problem.

Wednesday morning I decided to rebuild the Pi OS. I started with the latest Noobs (pi speak) build. And try again. So after installing Geany, a lightweight IDE for writing Python I was ready to go.

I plugged in the CodeBug to the GPIO ports on the Pi, then turned on the Pi. Before the Pi had finished booting a dancing bear was showing on the CodeBug LEDs. This made me realise that I had forgotten to download the tethering program, and that I probably needed to read the instructions a little more carefully.

In rereading the instructions I realised that tethering comes in two flavours on the Pi. Firstly, and I had missed this, partly in my haste, that the first tether mode I was attempting was using a USB cable. However I had plugged the CodeBug into the GPIO pins. So USB tethering was never going to work. But i2C tethering through the GPIO pins should have worked. So the software refresh wasn’t a waste of time, but I also needed to read the instructions more carefully.

USB TetherThere were 2 references to connection via a USB cable. In a picture, that doesn’t actually show a Raspberry Pi, and then on the last line of the overview text of the example.

The examples are very good, and well documented. I admit I rushed, and didn’t read the single reference to USB tethering.

Lesson learnt: Use the latest build, and read the example text – thoroughly. Yes, I think that the USB tethering line could have been more prominent in the example, but there was a picture as well, and I had missed 2 clues!

Once plugged in, via a USB cable, I followed the example python scripts and all was well.


Python code to scroll text on CodeBug

But that is the thing with CodeBug, you then think, “well I want to scroll some text like Blockly does“. Ah ha. When you write in Python the CodeBug tether library does not provide a scrolling program. So you have to write your own. An example is given, but it is more fun working it out from basics. The way you get text to scroll is by adjusting the pixel map start point. You display the same text over and over again, just decrementing the starting column, from 0, down to a minus value that is 5 (for five columns you have to scroll across) times the number of characters in the string. Therefore “Hello CodeBug!“, is displayed from column 0, to column (0 – (14*5)=  – 70), in decrements of -1.
(NB. Longer lines of text seem to scroll slower!)


CodeBug connected to RasPi GPIO

Then it was on to trying out the direct GPIO connect and the I2C interface.  This means connecting the CodeBug directly onto the GPIO pins of the Raspberry Pi. Something that should always be done with care. And note that you should never connect power from the GPIO Pins, and either battery or USB. There is a warning on the page, but others seem not to be reading all of the text, just like me . . . .


I followed the scrolling digital CodeBug clock  example. The python program gets the current time and date from the internet, then formats the time and date outputs and sends them to the CodeBug, scrolling them across the LED. I slightly modded the program to display the short month rather than digits, (%b not %B). On my Model A, it displayed the Time then Date almost exactly twice a minute. To within a fraction of a second.

I only experienced one small problem. I set the scrolling time parameter to 15 (15 seconds), not .15 (point 15 of a second)  which meant that the display stood still for 15 seconds and would have taken approx 20 mins to scroll the time string! Ooops.

I was pleased that I had overcome the initial problems, software and not reading the instructions properly. And now could think of lots of things to do with the CodeBug, RasPi and Python. I think tethering via USB might be more useful than via the GPIO pins, but it is a useful capability.

BlockyBeing quite taken with Blockly I decided to investigate further. Following the links I eventually came across the Google Developer Pages for Blockly and the instructions for installing Blockly on your own machine here.

Now thinking about how to get Blockly onto RasPi, and get it to generate Python code.  This sounds like fun. Start small. One step at a time. Then when I have learnt enough, completely revise the architecture and start again 🙂

The CR2032 batteries arrived meaning that the CodeBug can be used without plugging into a computer. This just worked!

The USB leads arrived. I had bought the wrong ones. No data cable! They only provide power to the CodeBug, but don’t do data exchange. Oh well. Out with the soldering iron to make the lead I really wanted. Should have read the small print. These will be recycled to use with Raspberry Pis.

Write this blog post as a way of documenting the CodeBug experience and start to think of other things to do with the CodeBug. I am definitely going to try the ‘get coding in under 2 minutes’ out on some friends 🙂  And the fruit keyboard – the tactile immediacy, having written the code, seeing all the wires, is great fun.

And I am thinking of doing more with my CodeBug. I bought 2. I gave the other one to my wife. She’s got the bug as well! In fact she got going a little quicker than me. Obviously reading the instructions more carefully!!!  A lesson to be learnt there no doubt?

One project I want to try is to tether 2 CodeBugs to the same computer, then scroll a message across both CodeBugs, so that it appears as if the text is crossing from one to the other. If I get that going I will add a video, so watch this space . . . .

CB Detail

I am very impressed with the CodeBug. It is immediate. It is tactile. It is fun. But I am not only with impressed with the device, but also the complete environment surrounding it. The interactive, visual, development environment, including compiler and simulator is great. The Cloud storage of your code is excellent. The price, £15, is fantastic. The examples are easy (ish) to follow – as long as you actually read them and not skip ahead. It is a well designed system, which just works.

If you have read this far and haven’t already ordered a CodeBug, then stop reading, and buy one now.



A Measures & Metrics Hierarchy?


This session has been inspired by following the journey of Solar Impulse 2 (SI2), an aeroplane powered only by solar power, as it circumnavigates the globe.

In June this year SI2 flew non-stop 5,663km from Japan to Hawaii. It took 6 days, using only solar power. The pilot sleeping in 20 minute naps, flying above and around weather systems, whilst travelling at around 30 knots, between 4,000 and 30,000 feet in altitude.


SI2 Landing in Hawaii

It sounds remarkable now describing the feat which smashed all solar powered flight records.

What was even more amazing was as the plane flew it transmitted real time data back to the control centre in Monaco, and the information was then published, live and real time, on the internet at

This got me thinking. Firstly, wouldn’t it be amazing if our software testing projects could broadcast live, real-time metrics and measures just like Solar Impulse? And this must be easier for us to do because we are not high over the middle of the Pacific Ocean, linked only by a sat phone?

Images used by kind permission of

Secondly, of the 14 key measures and metrics that were being displayed, some were fundamental flight and safety related. Always good in an aeroplane to know your; altitude, speed, and attitude. Some were flight plan related, in terms of direction and timing. And others were more inspirational, such as a view of the overall world circumnavigation. Not needed on a second by second basis, but giving overall context to the journey.

And that was when I had the thought that where we often struggle when producing software testing measures and metrics is that we mix up the safety with the inspirational, the planning with the performance.  Which may be why some people are against measurement, because they are stuck in a loop of safety measurement driven by fear. And others think that measurement and metrics can only be achieved as a complete end-to-end program of works, putting off all but the keenest of measurement disciples.

What software testers may find helpful is a hierarchy of software testing measures and metrics, along the Maslow lines of; Physiological, Safety, Belonging, Esteem, and Self-Actualisation.


Maslow’s hierarchy of needs – Wikipedia

Knowing which measures address which needs on our projects may help save us from; life in the dark with no measures, producing the wrong ones at the wrong time, or being driven by measures and metrics rather than using them as tools to help us test software.

That could give us a new appreciation of what each of our favourite measures and metrics, S-Curve, Bug Count, Velocity, DDP, Coverage, Defect Heat Map, Burn Down Charts, <insert your favourite measure here>, etc., is achieving for us on the Maslow Hierarchy. And maybe an understanding of what each measure or metric we use is actually doing for us, where we may be misusing them, or where we may wish to use them in the future

Of course this may not work. But I think it is better to try and understand what our software testing measures and metrics are doing for us, than to either blindly generate screeds of impenetrable charts and numbers, or worse still, not produce any at all!


 PowerPoint Show    PowerPoint show (6.6mb)

Presented at:

1. UK TMF, London, Oct 2015.

UK TMF Session Outputs:

Below are the output flips from the session and the resultant hierarchy.

PNG  Flip 1     PNG  Flip 2    pdf  Hierarchy


RasPi Time-lapse Camera

Raspberry Pi Camera Board

Raspberry Pi Camera Board

I have had a Raspberry Pi camera board since they were first available in May 2013.

One of the big advantages of the Pi camera is that it can be program controlled.  That means you can write a program, in my case in Python, that can control when you take one or many photos.

I had seen a post on time-lapse photography and thought “I can build one of those“.  So I did.


I think it looks fantastic when it is finished. If you can’t wait, fast forward to 42″, and watch a rain shower followed by brilliant blue sunshine. Don’t forget to watch in 1080p if you can.

It took about 75 lines of python code and now I have a time-lapse camera program. Thanks for the inspiration and example code link here.

Well, I have the program which takes the pictures. The images then need to be stitched together. And finally converted to something like an MP4 file.

Why 75 lines? Sounds like a lot?  I wanted the program to be variable, so using inputs I can decide how many shots to take, and how far apart the shots are taken. This allows me to do a trial shot. Look at the results, check that the camera is pointing in the right direction, then go for the full run, for example 2,400 shots at a 6 seconds delay. Most of the code actually sorts out file names and directories. Just to be difficult I decided to use numbers for my file names, not just a time date stamp, so a lot of the code enables that.  It is possible to write a much shorter program, or even just use the time-lapse feature in raspistill.

To make an 1080P HD movie you need to take 1920(w) * 1080(h) pictures, and stitch them together at 25 frames per second (in the UK).  So for 1 minute of video you need to take 25 * 60 = 1,500 pictures. At 6 seconds delay between shots this is going to take 2½ hours.

(You will need to set some times  aside to do this, make sure that the camera isn’t going to be moved, or become obstructed.  Tip: Start with shorter runs.)

Time-Lapse Camera

Time-Lapse Camera

My set-up is simple, a Pi, WiFi dongle, and an Duracell emergency mobile Phone charger battery. I run the Pi headless, which means without a monitor and keyboard. I connect through either my laptop or a tablet.  And if I am out and about then I can use open a hotspot on my phone.

I even bought a case for my Pi that looks like a camera. Not bad for about £10.

(Update: I have since added a magnetic lens, glued a washer to the front as a mount, and upgraded to a 12,000 mA-h PowerBank battery for even longer life. I am currently working on a tripod mount.)

Smart Pi Camera

Smart Pi Camera

I have recently bought a second camera case, a SmartPi, which has a GoPro tripod mount. This is designed for a B+ / B2. I have used a RasPi B+, which uses less power than the original B, and my PowerBank lasts even longer 🙂

(The SmartPi case has Lego mountings, which opens up a whole nother world of possibilities!)

Just a note: You can do all of the video encoding and conversion on the Pi, but I use my desktop PC. It is a lot quicker. For example 50 minutes+ on the pi = 5 minutes on the desktop! And all of the software is open source i.e. ‘free‘.  The only additional expense need be the RasPi Camera Board.

This is great, but I can do all this with my tablet and I don’t need to fiddle about with any of this Raspberry Pi stuff.”  Well, yes, you can.  But you are much less likely to stick your tablet in a Tupperware box, and leave it in the middle of a field for 24 hours, than you are with a Raspberry Pi. And where is the fun in using a tablet?  With the Pi you have the satisfaction of knowing that you ‘made it‘.

One more that I made earlier:

PS. Avoid the sun being in the shot for long periods as here. This shot burnt off the IR filter and left a blue line across every subsequent image.  The contrails look great though 🙂