Archive for the ‘(Uncategorized)’ category

Arduino Pro Mini / Lilypad pinouts

May 3rd, 2015

I have been using the Arduino Pro Mini and the Arduino Lilypad recently with an external programmer. As I normally use a generic USB programmer and need to connect each pin manually I am continually looking up what needs to be connected where. This is a table of connections to make this easer.

Name Arduino
Pro Mini
FTDI Cable FTDI Cable
Budget Cable
Ground B GND GND Black n/c n/c
Ground GND CTS Brown GND Black
Receive RXI TXD Orange TXD Green
Transmit TXO RXD Yellow RXD White
Reset G Reset RTS Green n/c n/c

433MHz Antenna Lengths

December 19th, 2014

I use a cheap 433MHz transmitter modules often and every time I need to work out what antenna length I should use because I never write it down. This blog post is me writing it down. The length needs to be an harmonic of the wavelength. The wavelength is speed of light divided by the frequency, or 299,792,458 m/s divided by 433,000,000, or 692.361334873 mm for short.

So the acceptable lengths are…
433MHz Transmitter Module

  • 692.36 mm
  • 346.18 mm
  • 173.09 mm
  • 86.545 mm
  • 43.273 mm
  • 21.636 mm
  • 10.818 mm
  • 5.4091 mm
  • 2.7045 mm
  • 1.3523 mm
  • 0.6761 mm

In reality I normally go for 87 mm, or 43 mm if I am tight for space and don’t need a strong signal. I did once use a 17.3 cm antenna and the coverage was amazing.

Scratch Bikes Data

July 13th, 2014

Scratch Bikes in Newcastle

In this post I reveal a little secret about Newcastle’s now defunct cycle hire scheme and make the cycle location data collated over two years available.

Until the end of 2013 Newcastle had a cycle hire scheme called Scratch Bikes operated by Grand Scheme (formally both WhipBikes Ltd and Scratchbikes Ltd). Back in 2011 I decided to use the cycle location information on the Scratch Bikes web site to make an amazing animation like the animation done using data from the Boris Bikes in London. Sadly I found that the data was anything but live so I could not.

When I pointed out the web site and phone app were inaccurate Scratch Bikes were quite honest and came clean that the numbers were in fact entered manually when the bicycles were checked at the start of the day. I did offer to help link the systems together but sadly they did not respond to my offer. They did however try and hire a friend instead but I guess they had their reasons.

So the data…. In 2011 I set up a server intermittently checking the Scratch Bikes web site to find out how many cycles were at each station. As mentioned the data only changed once a day and was not enough for my needs, but I had already coded up the scraper to discover this so decided to leave it running just in case it was useful. This ran continually for 2 years. I do not know if it is useful.

You can download the Scratch Bikes Usage Data here. The time stamp is from the site and appears to be the time when the data was entered on to there system. There is a separate table with the location information in. One note is that I do not have the official data for Malcolm Street and Cuthbert House (presumed to be 3400 and 3405) so I have made a best guess. If you can fill in the blanks then please get in touch. Please take the data and do cool things with it, and let me know what you do with it.

I will just close by saying that reimplementing the phone service and building a web service is not hard for someone like me to do. In fact I can have it up and running within a couple of weeks, the web site and app will be live and accurate, and you would be able to book out cycles by text, voice, from a smart phone, and a PC as well. If someone wants to team up make this happen again in Newcastle then get in touch.

Fancy another laugh at my expense?

January 30th, 2014

Bright ClubWell this is your opportunity on Tuesday evening.

A couple of year ago I preformed at Bright Club Newcastle, a “geek” style stand up comedy night. Well for some odd reason I have been asked back again. I guess they are desperate. Anyway, I will talking about my pet plastic duck on Tuesday 4th February.

If you want to come along there are details on the Centre for Life web site.

SnapCam to Close

December 21st, 2013

snapcamlogoSnapcam is a simple Windows web cam application and web service I produced in 2003 as a pet project. It simply took an image at a set interval and uploaded it to the web service. The (almost) live image could then be embedded in the user’s web page. It is now outdated and sadly I need to close the free service down.

It was designed to be very easy to install without a complicate signup process, and it initially ran entirely on a free hosting service available at the time. Use has fallen away over the years as most people have move on to a more modern web cam solutions, or stopped completely. Today I don’t feel it worth updating the software or moving the service on to new hosting that I need to do. I am really pleased people found and used the service useful over the last decade and part of the code does live on in some time lapse experiments.

New users have not been able to start using the service for a while, and current users should have been receiving a warning message through the software. The service will stop functioning on or after December 24th 2013. If you wants to keep using the service after that date then please get in touch and I will see if I can come up with a low cost solution for you.

Farewell Rails Playground

December 21st, 2013

Most of my web sites, including this blog, and various experiments have been hosted on Rails Playground that I migrated to 6 years ago. On the whole things have gone well with only one short outage in the first 5 years, but sadly over the last year there have been a lot of problems including outages, data loss, and security issues. This post is a quick summery of the problems. I will be posting about some other related changes in the very near future.

It all started when another of their customers started relaying spam email, perhaps because of a security floor, or perhaps they were just a spammer. Because of this all outgoing email was blocked without notice. I have to say I am not at all happy about the way this was done and it stopped all my services that use email dead without any prior notice or notification. I was also not best pleased at the attitude that this was not a critical part of the service and I was initially expected to adapt my services to another email system.

After this happened for a second time and a lot of moaning my sites were migrated to a new server. They did all the migration for me although it would have been easer to do myself. They inconsistently screwed up the dates when porting the databases. Being a US focused company with technicians in Asia migrating UK sites between servers in goodness knows where I can see how it happened, but it is not an excuse for the error.

Another problem is this new server was running the security mod called suEXEC that will allow email to be blocked per user, but unless some effort is put in it opens up a gaping great security hole. The way suEXEC was set up, and in fairness this is becoming quite common with the lower end hosting companies, will allow someone who can find a small exploit in any code to completely take over my sites. I like to think my production code is secure, but no one can 100% promise this, and holes in WordPress and PHPBB are being found all the time.

My general advice is if your ISP uses suEXEC, and the account you use to upload files is the same account that the web server uses to access the files, then just go to another ISP. If you have a separate user account for the upload and the server then this is the prefect setup, but if not you are better without suEXEC at all.

Anyway, the new server was also resulting in a huge percentage of cron jobs failing and I can not login using SSL most of the time. After a few more significant outages things got a little out of control and I decided I had to move away.

I have now moved everything that I am not culling to a new virtual machine hosted with Digital Ocean (and that is a referral link so if you are thinking of signing up then please use the link). Although I am a fan of managed shared hosting (despite it not being popular in some circles) I am having trouble finding a good and reliable ISP at a decent price. As a result I have had to go the self hosted route that will take a little more effort than I would like, but having done it before I feel I have the sys admin skills to keep things secure, efficient and a lot more stable than things have been recently.

I am truly am sad to have to be moving away from Rails Playground as they really have been good in the past and I have been happy to say so, but I need an ISP I can rely on and sadly I can not do this any more. :-(

Goodbye Television Centre

March 22nd, 2013


This is a sad time for those who have fond memories for the good old BBC Television Centre. BBC News moved out last week, the last broadcast from the building happening as I write this, and the building closing at the end of the month. I am one of those people with fond memories.

When I was young my father, formally an electrician in the the theatre, became a broadcast engineer for the BBC and this is why we moved to the south of the country when I was at school. The coincidence of this is I gained access to one of the most interesting places in the world, that being TVC.

At first I thought I must have only been to the building half a dozen times, but writing this I realised just how many more times I have been there and how many memories I have. I have seriously lost count and have seen so much to look back on.

I have been on the Top of the Pop set (in TC2 I think), in the 1980’s Tardis, and watched the (slow) filming of many random programmes from the viewing galleries. I remember walking through the sets of Johnny Briggs, Rolland Rat, and the back of the Noels House Party (that at the time was more of a doughnut than the binding it was contained in).

I have sat in the old news studio when the automated cameras were new and subtitling was done from the corridor. I have seen the turntable the christmas penguins rotated on, I have played with the old COW (Computer Originated World). I was even the first to see the Kenny Everett title sequence when VT was in the basement.

I have walked the corridors and past so may doors. I have eaten in the canteen, drunk the tea, chatted in the BBC club. I have explored the old OB units. I have relaxed in the Blue Peter garden. I have played with the galleries and must be one of the few people who can use a vision mixer that were self tort. I have visited three generations of network control and discovered how stupid all the security keys expiring on new year is.

I have even helped with the TV7 refit in the 90s. I have also briefly been on kids TV but not filmed at TVC. There are so many other memories but if I keep going I will not stop for months.

The most amazing thing is I never got lost in the building. Well, yes, okay, that last fact is a complete lie.

One odd thing is most of my experiences of the place were as a child. Even in the 2000s it was starting to feel a bit foreign and like the next generation had taken over. The atmosphere was still there but I was no longer part of it.

I have not been back since the great Manchester exodus started to drain the life out of the building. I don’t really want to because now there is just a building. The life has gone. I guess the memories will still be there but the atmosphere and the community is what the BBC has really lost, and I think it has gone because I can not find is elsewhere.

So that is it. Goodbye Television Centre. I have some fond memories. They are old and at times they feel like I was a different person, and in many ways I was, but I treasure them never the less.

Just in case you were wondering anything I did within TV was pure nepotism, but my radio career was all my own work.

Sport Starting

July 31st, 2012

This weekend gone I was in Leeds for LeedsHack3, a 2 day hack day that took place in Leeds City Museum where I created SportStarting.

It was a great weekend although I spent half of it searching through plant rooms and climbing in roof voids replacing parts of the network that were just not capable of supporting the event. Thanks you [not] BT.

Anyway, the deadline for submitting hacks was 10am Sunday, so at about 9:45am I though I better submit something and then start working on it if I was to have something ready for the midday deadline, and that hack was SportStarting.

The idea was born from the large number of channels that the BBC have of Olympics on satellite and not knowing what was on what channel when. My idea was to do the same things as I did for OnFilm4 (and borrow half the code) and tweet when a sport was about to start.

Getting the listings was not as easy as I had hoped as the BBC Backstage feeds have quietly been turned off and services like Digiguide want silly money for the listings (£2,880 to be exact). I had a plan, but because I was starting the hack a day late I needed to revert to the backup plan, and that was to use the Guardian open data schedule. The down side of this is I did not have the channel numbers, but the up side is I could get it finished before the deadline.

Reusing so much code and having the data in a spreadsheet turned the day log hack in to a data manipulation and a simple code tweaking job that, despite a few interruptions, I had complete within the 2 hours available.

Finally I should add that the hack is legal and not infringed any copyright or other laws, but I might have called the team name “The London 2012 Olympic Games Summer Gold Silver Bronze Winning Team (sponsored by Burger King and Mastercard)” as a bit of a satirical joke. Sorry about that.

New OnFilm4 Logo

March 19th, 2012

After a request from Film 4 I have changed the OnFilm4 logo to make it less like the official Film 4 logo so people do not think it is an official service of Channel 4. As they asked so nicely and have a good reason I have no issue with doing this. Hopefully it retains the essence of Film 4 without being confused with the official logo.

If only other organisations (I have two in mind) would write polite emails instead of threatening ones with sudo legal bull they might have got what they want as well. There might have been a little rant sneak in there. Sorry about that.

My no voicemail experiment

October 5th, 2011

Yes, that is correct, as of last night I am no longer using voicemail on my phone so to leave me a message you will need to use email.

As of two weeks ago I have become very busy for reasons that I will no doubt be blogging about soon. As a result I can not take many mobile calls and a lot of people are calling me leaving messages. I am constantly finding several messages on the phone at a time, some already dealt with, most duplicated in an email, a few from the same person calling back multiple times, and a huge number of “please call me” messages with no hint as to why or if it is in any way important. It should also be noted I don’t have time to respond to all of the messages.

As a result I have decided to stop using voicemail all together on my phone. I looked at several solutions over time that will take the voice mail and convert it to an email for convenience, but this only makes retrieving the message easer and does not simplify me making my response so it is email all the way I am afraid. I am not the first to do this as some friends have already given this a go. So from now on if you need to contact me then please send me a VERY SHORT email me and I will respond by email.

Please don’t feel this is unfair. It is a common question “how can I reach you quickly”. Although people don’t realised it they are in fact asking how do I jump the queue to get Alistair to do something. The truth is that I can not do everything, respond to everyone, and be at your beck and call. Sorry but I need to prioritise and no matter how important you think your issue or question is it might not be top priority when combined with my list of things to do. Moving entirely to email helps with this prioritisation.

Also please be brief in your email. If it is a line or two and I can deal with it when it arrives then I will, otherwise it will be dealt with in the evening, the following day, or in the following week depending on what else I have to do. Things do get missed so feel free to email again, but only after a few days, and include all I need in the latest email as I will probably delete the older ones.

Finally let me know how this works out from your perspective.