After describing how to hook up your CurrentCost meter to your PC, it’s now time to see what else we can hook it up to. An obvious candidate is the Arduino microcontroller. For this project I’m using an Arduino Diecimila, which can be obtained quite cheaply from tinker.it in the UK.
Despite building our TTL->RS232 adapter in the previous post, it turns out that we don’t actually need it to interface with the Arduino - as with most microcontrollers, it expects TTL-level inputs. This makes the wiring trivially simple - we merely need to hook up the ground and data leads from the CurrentCost meter to the ground and one of the digital pins on the Arduino. As a reminder, pin 6 on the RJ45 connector is ground, and pin 7 is our data lead.
The Arduino has one hardware serial port which we could connect the CurrentCost data lead up to, but as the CurrentCost device only runs at 9600 baud, it seems a shame to waste our only high-speed serial port. Instead, we’re going to use the SoftwareSerial library to emulate a serial port on one of the other digital I/O pins - for this example, I chose digital pin 3. And that’s it - just two wires to connect!

Read more »
Filed under: Projects, Electronics on June 16th, 2008 | 11 Comments »

Note: since this article was written, CurrentCost have started selling data cables via their eBay store.
The current craze at IBM Hursley involves the CurrentCost meter, a simple little gadget that measures power usage in your house. These are being discussed on IBM blogs everywhere, because while the device itself is very neat, it also has the ability to output the data to a PC, allowing all sorts of neat graphing and other statistical analysis to be performed.
Unfortunately, while the device is available in the UK for a very reasonable price, the data cable is not widely available (I got mine from a guy at work who gets them directly from the manufacturer). Fortunately, the cable is actually quite simple to make yourself if you have some basic electronics knowledge!
Read more »
Filed under: Projects, IBM, Electronics on June 15th, 2008 | 16 Comments »
Here’s a neat little script that I just came up with that will be useless to most people, but someone might find it handy.
I’ve been playing with Microsoft’s SyncToy recently, as a way to keep the stuff I’m working on up-to-date between my workstation and my laptop. In order to do this, I kick off a synchronization every hour that compares a bunch of directories on my laptop and workstation, and ensures that the latest changes are present on each machine. This means that I can do work on my desktop and when I go home, it’s automatically on my laptop. Any work I do at home is then automatically moved back across to the desktop the next morning.
It’s very neat, but there are certain times when you don’t want this to take place. For example, when I’m at my desk, I have a nice 100mbit ethernet connection between my machines, so the sync typically takes a few seconds. However, when I’m in a meeting, it can easily take a few minutes over a WiFi link. If I’m working from home, that can extend to half an hour over VPN. And if I’m on the road, connected through my phone, well, it doesn’t bear thinking about.
Of course, it would be easy to simply disable the automatic synchronization in these circumstances - but in my experience, when I disable something like that, it can very easily end up not being re-enabled. I wanted something that could detect my location and act accordingly.
Read more »
Filed under: Useful Tips, Work on May 3rd, 2007 | 1 Comment »

Filed under: Photography on April 23rd, 2007 | No Comments »
Recently, I’ve been working on getting one of our products compiled and tested on 64-bit Windows. In order to help with this, I’ve been given a nice, shiny, super-fast 64-bit machine running Windows XP Professional x64 Edition.
After getting the build working correctly on this machine, it was time to port over my changes to our build system, so that the 64-bit material would be available to our development and test teams. However, when I moved it over, I ran into a problem, and it was a bit of a mystery. When attempting to compile using the 64-bit C compiler shipped with Visual Studio 2005, I was getting return code -1073740966. Not really a descriptive error!
Read more »
Filed under: Useful Tips, Work, IBM on April 18th, 2007 | No Comments »
Microsoft’s Remote Desktop Connection application is useful in a lot of scenarios, be it administering a large number of servers or connecting to your workstation when you’re out on the road. I use it regularly both at work and at home.
Before Remote Desktop became widely available, VNC was the de-facto standard for remotely administrating a machine over the network. One of the big advantages to VNC is that it’s multi-platform, allowing you to administer a Linux machine from a Windows box, and so on. However, when using VNC between Windows machines, it always seemed slow to respond compared to Remote Desktop, hence why myself and many others prefer using it when connecting between Windows-based machine.
Despite that, VNC had one major advantage for me - the ability to scale the remote desktop screen. In other words, you could make the remote session take up less space on your local desktop, by scaling down the pixels. You don’t get all the detail, but you get enough to check up on the progress of an installation, or see if you have any new e-mail. I was under the impression that the Remote Desktop client didn’t have this capability - until now.
Read more »
Filed under: Useful Tips on April 15th, 2007 | 1 Comment »
When the Wii first came out, I had a poke around online to see if anyone had done anything cool with the remote control that it came with - having seen it in action on the Wii, I figured there could be some interesting applications if it could be hooked up to a PC. Unfortunately, I drew a blank. However, in the intervening months, it appears that a lot of work has been done in this area, which came to my attention when reading a post by Roo Reynolds (a fellow IBMer).
The Nintendo Wii’s remote control, colloquially known as the Wiimote, packs a surprising amount of technology into it for a console controller. As well as containing a three-axis accelerometer, it also contains a 1024×768 pixel monochrome CCD, and an object-tracking chip.
In addition, instead of using a proprietory wireless communication protocol, Nintendo instead decided to opt for Bluetooth as a means to communicate between the controller and the console. This means that it is also possible to hook the controller up to your home PC, be it Windows, Mac or Linux-based.
Read more »
Filed under: Projects on April 13th, 2007 | 3 Comments »
Hi there!
Is this thing on?
Filed under: Uncategorized on April 12th, 2007 | No Comments »