Welcome!

Welcome to my new website. I wrote the software that runs this site, so the design and function can only be blamed on me!

At the moment most of the content is from my old electronics blog that was at this site, but there will be new categories and content covering all aspects of - well - stuff that interests me.

Blog

New Laptop

Bought a new laptop for myself, since my old one is 5 years old and showing signs of physical wear 'n' tear, and its a wee bit sluggish too.

Read more >>>
Python

REST APIs in Django

I've been working on some RESTful APIs in Django. I know, Django's not the most efficient for this purpose, Flask et al may be better, but I've got a lot of template driven views, and loads of tables in the ORM.

Read more >>>
Raspberry Pi

Controlling relays etc. with a Raspberry Pi

Friend and sometime co-conspiritor of mine Peter of Greenlight Electronics (who's shop website I've done some work on) manufactures and sells these relay controllers for the Raspberry Pi. I've been playing with it and its super easy to use, with various powering options for the load. Basically it has 8 open collector drivers that can pull down a maximum of 500mA (4A total for board) which is more than enough for relays, LED's and small motors (e.g N or OO gauge model trains!).

Read more >>>
Minecraft

Minecraft 1.8.3 Drops

A bit late with this update, but quickly following 1.8.2 this update fixes many bugs, including many random crashes. Notably the bug/feature that allowed you to break holes in the bedrock on top of the Nether has been fixed. so as pf this moment you can no longer do this. Until someone works out how....

Read more >>>
Python

Django: Many-to-many tables and forms.

Django handles many-to-many relationships automatically by creating relationship tables. for instance, to use the typical example, consider the two models:

Read more >>>
Python

Django - Moving fields on modelforms

You can use the inner Meta class's 'fields' to supply the order of fields on a modelform, and this works fine, except that you need to list ALL the fields you want to see on the form, and that means you will need to remember to update this list every time you add a new field to the model. I prefer to exclude fields that I don't want on the form, but that leaves the problem of ordering the fields.

Read more >>>
Minecraft

Minecraft 1.8.1 Drops

Well Mojang's aquisition by Microsoft hasn't stopped the updates coming. 1.8.1 isn't a HUGE thing, but there are many bugfixes.

Read more >>>
Blog

Where advertisers get it all wrong..

The more connected we are, the more marketers and advertisers are snooping into our spending and browsing habits on the pretext of giving us a more "relevant" experience. However the tools and methods they are using display a strange lack of thought.

Read more >>>
Blog

How I abused someone online

After my good friend Mike died I bought some of his karaoke gear at the charity auction. I really only wanted to get his microphones for sentimental reasons, a reminder of the days larking about doing karaoke at the Wellie and the KC in town; and maybe a CD-Mix because I love playing DJ at home and making mix disks for the car. I got a bit carried away and ended up coming away with those items, some speakers, a karaoke machine (to go with the one I already have!) and a few other odds and sods. So then the idea of perhaps doing a few events from time to time came to mind, and to others too who egged me on :) Although Mike had given me a hard disk of all 18,000 tracks he owned for safe keeping, I obviously couldn't use them because it would be illegal, and the 2000 odd tracks on the disks I did have where a somewhat eclectic selection and definitely not enough to "go out" with, so I looked to pick up some more. That;s when I found watt-laur on ebay selling a load of disks, claiming her Uncle was retiring as a DJ and had given her the disks to sell - 50 disks for £50. Not bad. The picture showed them in a folder (which was not for sale) that sort of obscured the disks, but they where colorful and had printing on them so I didn't think further.

Read more >>>
Programming

Setting up a local mail server

By local mail server, I mean a mail server that just delivers mail from local users to local users. What? Why do I want to email myself? Well I don't want to email myself, but commands like cron, batch and at will send the output from the batch jobs to you in mail. I wanted to receive these logs so I needed a mail service on my linux box.

Read more >>>
Python

Dealing with console logging/IE problems

As you may now putting console.log (or .error or .info...) into a javascript will stop the script working in most versions of Internet Explorer unless the debugger ("f12 tool") is open, except possibly version 11.

Read more >>>
Blog

Why I won't be buying Windows 8.1*

{* Unless I buy a computer that has it on!)

Read more >>>
Blog

Hi Peeps

I started a new job in January that involves a long commute, so things have gone a bit quiet at the moment, and I've not had time to spend on projects, or even this blog. I do have some ideas on stuff to come however, and I still have a backlog of stuff to work on so now things have settled a little hopefully will have time to write it up.

Read more >>>
Blog

Happy New Year

A happy new year to all my readers.

Read more >>>
Electronics

Setting up Quartus II

I installed the Quartus 2 software onto a clean install of Centos 5 32 bit (I.E. RHEL 5) on an olo laptop I had sitting around. I did this because I wanted to minimise problems. Here is a log of how I got along.

Read more >>>
Opinion

Web filters: Bunk and baloney

One of the problems with the UK (and other countries, I am sure, but I have only personal experience of the UK) is that we are a country run by people whose main qualification for the job is a desire for power and a nice haircut. Many of our MPs went into politics straight from passing their Political Science (!) or Economics degree, with no real world in anything other than the accumulation of bits of paper.

Read more >>>
Raspberry Pi

Gertboard stability modifications

Eighteen months ago I ordered the Gertboard for my Raspberry Pi. It is a cool add-on that gives you buttons to press, LEDs to flash, A-D and D-A converters, a motor driver, a relay driver and on top of all that an Atmel AVR Mega386 which could be programmed using the Arduino environment using the RPi as a programming device. I bought the early "self assemble" version - Note that these modifications may not apply to the newer pre-assembled version.

Read more >>>
Programming

Subversion: Useful commit hooks

Just a thought on things to look out for in a subversion pre-commit hook.

Read more >>>
Electronics

Getting started with CPLDs

I'm not an expert on CPLD's or FPGA's or any kind of programmable logic. This page, and any pages that follow in this series document my journey into this area. Any example code given should be treated with this in mind - in particular don't assume that any code or design here is an example of the best way to do something, although I will have checked that the code works to some degree or other on my development system.

Read more >>>
Raspberry Pi

Keys to getting the Pi working

I just used the cheapest 4GB SD card I could find in Staples, a PNY one., which worked with no problems. Maybe I was just lucky – some people have reported difficulty with some makes. Consult the Verified Peripherals List on the wiki if you are in any doubt. If you’re still having trouble, make sure you’re installing the latest version of Debian because some are reported to be troublesome on “Squeeze” but fine on “Wheezy”.

Read more >>>
Raspberry Pi

Configuring your raspberry pi as a NAS server.

You can buy self contained NAS drives now, but if you’ve already got a large USB drive and want to share it on your network, you can configure a raspberry pi to act as NAS server for you.

Read more >>>
Python

LOLpython programming

Today in a moment of relaxation I have been LOLpython programming. The Olimex website puts on a weekend programming challenge and this week its all about cats. I decided to code the answer in an obscure esoteric programming language since LOLpython is the preferred programming language of the LOLcats that we all know and love.:

Read more >>>
Raspberry Pi

Whats best: Raspberry Pi or Arduino?

Because the Raspberry Pi and the Arduino are of a similar form factor and price, some people have asked which is better for building into your projects – the Pi or te ‘duino??

Read more >>>
Embedded

PIC 16F1455 USB Dev board

Recently, as I have blogged, I bought a number of PIC 16F1455's from Microchip as pre-full-production samples, as I was intrigued by the idea of a PIC 16 with a hardware USB port on it (all other USB pics are in the bigger, meaner PIC 18 and higher ranges). It also has a few other nice features:

Read more >>>
Embedded

NiMH battery maintenance trickle charger (Part3)

In this section I'll be discussing the software for the timer in the trickle charger. The whole source code is available in a zip file here if you want to download it. Its free for you to use, as described in the licence at the top of the file. I won't have all the code in this article, just the "meat". If you want to see every byte and bit of it, then download the zip file .

Read more >>>
Embedded

NIMH battery maintenance trickle charger (Part 2)

In this section, I will be discussing the electronic design, and some of the calculations that go into it.

Read more >>>
Embedded

NIMH battery maintenance trickle charger

With this article I intend to go through the whole process of designing a PIC based project, including designing the electronics and software and so on. It's a deliberately simple project which is just a slightly more polished version of something I breadboarded to solve a problem I had.

Read more >>>
Raspberry Pi

Raspberry Pi logging issue

Yesterday my Raspberry Pi NAS server.music playout system just stopped working. Logging in all seemed OK, 'ps' showed the processes running, the webserver running the music playout app was serving pages, it just wouldn't play out music...

Read more >>>
Electronics

Current rating of wires.

If you’re designing a circuit that has to pass any significant current you will be faced by the prospect of choosing wire to carry that current, and will probably notice that the current rating of insulated wire doesn’t seem to make sense from type to type. For instance, looking at vehicle wiring products thinwall cable, a 16/0.2 wire (0.5 mm2 area) is rated at 11 amps, but a 16/0.2 cable from maplin is rated at 3A, one from Rapid at 6A … what’s going on?

Read more >>>
Blog

Defenestration of a Virgin

Laptop, that is! Yesterday I bought a brand new Compaq Presario CQ57 laptop (15.6” widescreen, 4Gb mem, 320Gb drive etc), and took windows off it.

Read more >>>