Archive for the ‘Fun’ category

ZX Keyboard

July 31st, 2014
A ZX Spectrum converted in to a USB keyboard on show at Manchester Mini Maker faire.

The ZX Keyboard, a USB keyboard made from an old ZX Spectrum on show at Manchester Mini Maker Faire.

Several year ago I decided that I wanted to make an old ZX Spectrum keyboard work with an emulator and ended up making one in to a USB keyboard. This is the rather waffly history of the project with a few tips and links for building your own. I have also created a Hack a Day page for the basic build instructions and a GitHub repository for the files.

Although I have never owned a working rubber keyed ZX Spectrum (mine was a Spectrum+ with a more solid tactile keyboard) I was given a broken rubber keyed one many many years ago. It was in a bit bashed up and did not work, and I have used a few of it’s components to fix other machines, but surprisingly the keyboard was okay.

Back in the start of 2012 I wanted to mount a soon to be released Raspberry Pi inside and emulate a full ZX Spectrum, as well as a Commodore 64 just to mess with people’s heads. I waited until the Model B was Pi eventually available but it would not fit without making more modifications than I wanted, and the smaller Model A was a long way off becoming a reality. I then decided that instead of mounting the Pi inside I should turn it in to a USB keyboard so I could use it with a Pi or a normal desktop PC. Naturally I then forgot about it for another couple of years, until for some reason just now.

Several people have asked why I did not use Bluetooth (some more criticising that asking, but whatever) and there was a Kickstarter making new Bluetooth ZX Spectrum style keyboards, but the project was to use an original ketboard, get it working with the Pi, and to do it myself.

Anyway, the build…

The hardware was surprisingly easy with the big unknown being the USB communication to which I considered a few solutions. Lots of projects use  a Arduino Leonardo that can natively emulate a USB keyboard, or reprogramme the Arduino Uno’s serial controller that requires zero extra hardware, but will prevent the Arduino from being programmed via the USB port. I was keen to use a low cost (the one used cost £1.30) Arduino Pro Mini clone and a small number of basic components.

Having decided on the Arduino Pro Mini (yes, I have my cart pull the horse for pet projects) the easy solution (for me because of prior knowledge) was to get the Arduino to emulate a PS2 keyboard and use a cheap PS2 to USB converter. If it was a one off commercial project, or I was against the clock then this is what I would do as it is the quick and easy solution that adds pennies to to cost of the project. This however is a daft pet project that is an ideal excuse to use as a learning experience, so I decided to play with the V-USB library from Objective Development.  In the end I found the VUSB for Arduino library that had done a lot of the porting work for me, although I am bypassing the top levels of the library to increase compatibility and allow multiple keys to pressed. Now I have thins knowledge my default may well be to opt for USB for future projects.

Connecting to the keyboard hardware was easy enough as I reused the original connectors from the old motherboard that already had components missing. The flat cable from the membrane was very tarnished and had cracks across the connections but I chopped an inch off the end and this solved the problem. The connections have been well documented by hobbyists over the years so there was no backwards engineering required. The way it is wired to the Arduino is not just to make things look neat mind. I will also help the software. Instead of having to check each button of each column at a time it is arranged so multiple values can be read in an operation.

The key mapping took a lot of thought and I have tried to make the keyboard usable for normal operations while keeping full compatibility for Spectrum Emulators. I think I have managed that and have written a little about how it works on the hackaday page mentioned at the top of this post.

So that is it. I will be taking the keyboard to future hack days, Bar Camps, and Mini Maker Fairs if you would like to see it. I hope you are inspired to have a go at building one, perhaps a better one than mine. Do let me know if you do. If you want one but don’t have the time or skills to convert your old ZX Spectrum (or any other machine for that matter) then I am happy to do it for a few quid so get in touch.

Update: It appears that the latest Arduino IDE (version 1.6) will not compile the VUSB library because of an old big in it. A quick work around is to install an older version of the Arduino IDE. It works for me with version 1.0.5.

Best tweet of the general electon

May 8th, 2010

This has to be my federate one liners of the UK general election…

“Election 2010: The people have spoken, and they’re not making any sense.” Charles Barry

If things were a little different

January 31st, 2010

Today I was looking through some fonts for a project and came across some familiar ones. Just for a giggle I wondered what they would look like if things had worked out a little different.

Mr Duck's Amazing Web Site

January 15th, 2010

So, at long last Mr Duck has his web site. I have been taking pictures for Duck 365 for the last year, and stupidly have agreed to continue by popular demand. What I never quite got round to was making a web site for it. Eventually I managed to find some time by using the good old excuse of it being a learning exercise.

The site is a little tong in cheek fitting in with the Mr Duck back story. It is the web site that a small yellow plastic duck would have asked for. :-) It has a lot of new CSS layout in it that I have used as an experiment, but it does degrade gracefully. The thing that most amazed me is that the CSS font-face actually works, although there are bugs that I needed to work around. Also I accidentally I created a new simple templating system using an error document to catch the requests and build the web page. I shall probably build on this for other projects.

I have also found a new way to work on IE computability. It appears that IE6 and IE7 have very close layout problems. The markup for IE6 also fixes the problems for IE7. So what I have done is built the site using Chrome and Firefox, and then fixed the layout in IE6 for IE7 and below in a separate conditional CSS file. Then all I needed to do was work around the PNG transparency issues for IE6 and below in a second conditional CSS file. Everything else just works then, and I only needed one version of IE installed for development.

The best thing about the site from my point of view is that it should be zero maintenance. It automatically pulls the pictures from flickr and even uses flicker to manage the comments. I decided not to display the comments on the site at the tims as there a security implications of allowing users to add content to your site, but I do display a comment count and link back to flickr. I even dynamically generate the site map and RSS feed.

There are a few more things I would like to do. I plan to add some slow cloud animation, improve navigation, and intermittently add a few more random Mr Duck images to the background. For now though I will leave it or I will just not get anything else done.

So please check out “Mr Duck’s Amazing Web Site”, and you can also follow his antics on Twitter. Also please let me know if it works well or not on your browser and if there is anything else you would like to see.


December 19th, 2009

Last month I came up with the idea of Chocify, a tong in cheek web service taking the community aspect of Spotify and applying it to chocolate. In another of my fits of madness I decided I could come up with an idea every day and put it on the Internet like an advent calender.

Naturally I did not tell anyone because at the time I did not know if I could keep it up or if it would be any good. I also wanted to get a bit of design work done for it. As it turns out it’s completely rubbish, but I am still going so you might want to have a read anyway. You can follow these winning ideas on the blog, or on Twitter. Naturally I never got round to designing anything.

Chocify, it's the future

November 23rd, 2009

Today I came up with a cracking idea for a web service called “Chocify”.

People have been using Spotify to jointly build up playlists for the day, the season, or events. Why can this not be extended to chocolate? For example I like the idea of starting off with a KitKat Chunky, followed by a slightly more sticky Twix, and throw caushion and commen sence to the wind and top those off with a Double Decker.

Now, someone could see my mistake, that being the lack of a Crunchie bar, and insert it in to the eat list for me. I can also share this list with anyone I am visiting who needs to get supplies, or anyone who shares my taste in chocolate.

I know what you are thinking, but there is a revenue stream here. Yes people can take the lists and head down the sweet shop, but just imaging the convenience of a “buy it now” button, and within two or three months the postman (or woman, we don’t want to be sexist at Chocify) will deliver them to your door.

The domain name is still available but won’t be for long with such a great idea. It’s a winner. Anyone want to invest?

So, the Duck….

July 30th, 2009

As some of you may know I have been carrying a yellow plastic duck with me recently and taking pictures of it. At first this might seem the actions of a mad man, but I can explain.

In 2008 I attended BathCamp, a BarCamp unconference in Bath. There was a bath at BathCamp that contained ice, cans of beer, and lots and lots of plastic ducks. At then end of the event we were given the ducks and asked to take pictures of them in cool places. There is a competition, but I don’t know if there is a prize, or if it is still happening.

Now to 2009. As you may know I like to take the odd picture with a digital camera and many friends who are in to photography. I was persuaded to give Project 365 a go. This is when you take a picture every day and upload it to the Internet.

As I often had the duck with me just in case of a cool photo opportunity I decided it would be fun to do an additional Project 365 for the duck. I called this Duck 365.

Now with that almost making sense I should perhaps stop explaining, but I will instead continue. When you upload a Project 365 photo you tend to write a bit of text about the shot. With the duck photos I decided to do the write-up from the duck’s perspective, and inadvertently gave the duck a personality.

The duck has slowly been gathering a back story. He just kind of came in to existence so sees what is happening but does not understand it all. In many ways he has the brain of an adult with the understanding of a toddler. He is aware that he is a plastic/rubber duck, but he also thinks he is a real duck, and at times a human. He is also rather cantankerous at times and blames me for most things that do not go the way he expects.

Originally I was pointing out that the duck did not really exist, but people seemed to get rather upset by this, so I will go along with him being real for now. People now call him Mr Duck, bring there ducks to meet him, and even given him his own conference badges.

You can follow Mr Duck on his page here, through his flickr set, on his Facebook page, or his Twitter stream. Quite a few people seems to do so and I hope it is because of the humour I try an inject.

Geek Steam BBQ

July 21st, 2009

A few months ago I had the idea of holding a geek event at the NLSME’s model railway track. A few weeks ago I got round to doing something about it, and today the event has been published. Of you fancy a day out playing with trains, or just socialising with fellow geeks, then why not read more about it

Fail Blog

July 30th, 2008

I have not blogged web site recommendation here for a while. Instead I have been using my tumblelog but as Tumblr has a great Firefox button to assist with this. That being said I am seriously considering using and

Also I hate reading blog entries that are just extracts from a bookmarking site. If I wanted to read then then I wold have subscribed to that feed. Okay, moan over.

Anyway, this blog is so funny I decided it was truly worthy of a blog posting all of it’s own. It is the Fail Blog. Enjoy.

New York to London

April 18th, 2007

Have you used Google Maps to travel across continents? Someone suggested I have a go at planning a trip from New York to London. It worked well, although 3,462 mile swim across the Atlantic ocean in instruction 37 may take most of the predicted 29 days and 10 hours journey.

You can check this on Google Maps if you don’t believe me.