Hull Pixelbot goes public at the Amy Johnson Makerfaire

Today was the first public outing of the Hull Pixelbot at the Amy Johnson Makerfaire in Hull. I was interested to see what folks made of our little plastic robot with a pixel on top. Turns out that people seemed to like it, which was nice. We had lots of hardware group members who turned up to tell the Hull Pixelbot story (thanks folks) and how to get involved and it all went really well. 

We're going to develop this robot of the next few months and with a bit of luck I'll realise my dream of 100 Hull Pixelbots all wandering around together making art. Or something. 

If you want to get involved you can find out more at Next meetup is on Thursday 1st of September. I can't wait to see who comes along. 

We've even got a spiffy new logo now. 


Bendy Lenses at Folly Lake

More programming today. But we took a break by heading to the Folly Lake Cafe for lunch. I think they do the best chips in Hull. But I'm biased. They taste like the ones my mum used to make.

Anyhoo, the food was lovely and the day was very pleasant. And I'd taken  my Lensbaby, a simple lens which you can tilt to play with depth of field and whatnot. To adjust the lens aperture (the size of the hole that lets the light in) you drop in metal discs with different sized holes. And it has the ability to make very interesting images with selectively blurred bits. Great fun to play with. 

Hololens and Occulus Rift at c4di

I got to the c4di Hololens and Occulus Rift demos slightly later than planned thanks to a succession of red lights on the way. By the time I arrived the room was pretty much full and there were queues to try out the latest in virtual and augmented reality.

The interesting thing for me was the contrast in the devices. The Occulus  Rift is a fairly bulky device attached to a large, powerful PC. The Hololens just sits on your head with no cables, no external computers, just the device itself. It ran happily on batteries for the time I was there. I had a brief go with it and the experience was just as impressive as it was when I played with it last year. The thing about these devices for me is that, unlike things like stereo TV or multi-channel sound, people try them and just decide that they want more of this.

The Rift (and my weapon of choice - the HTC Vive) take you somewhere else. The Hololens takes where you are and adds value to the surroundings. They are both awesome technologies and I'm racking my brains to think of an area where they couldn't have an impact. Interesting stuff. Thanks to Trident for arranging the session. 

Sometimes it's a good idea to pause when things are going well

Today I've been writing code. I love writing code. Perhaps too much. If a program is going well I have to reminded to do things like eat and drink etc etc. 

This was one of those occasions. But as I was munching my sandwich I came up with a way to make the program even neater. If I'd carried on at full speed I'd not have spotted this for a while and then either missed out on a trick, or had to do some rework later on. 

Having thought about this a bit more I think that it is actually quite a good idea to walk away from a programming task for a little while and go back to it, even if you are coding up a storm at the time. On any programming project (particularly programming coursework) I strongly advise people to start early so that they have time to fail. But it also means that you can stop and smell the roses every now and then, and this can make the result even better. 

Caution Horses

So, we're driving back down the motorway on Sunday and we pass a huge van with the above message on the back. 

For a moment I had this vision of a the van containing a pair of specially trained equines who turn up when you do something stupid and say things like "Just this once, we'll let you off. But if you'd better not do it again". 

After some discussion we decided that it could also be an instruction to pull into the next field and tell the occupants not to eat grass like that, or whatever. 

HoloLens and Occulus Rift at c4di

I've not got a HoloLens. Or an Occulus Rift. Yet. But I've had a go with both of them and they are really, really interesting. The way I see it, there are two game changers coming round the corner as far as computers are concerned. One is the Internet of Things, the other is virtual/augmented reality.  You need to know about both of them.

You can get to play with the new versions of reality  at a c4di event on Thursday morning this week, which is open to all. Sign up here. It's free. I'm going.

New to Newcastle

I've not been to Newcastle for a holiday before. I've been for external examiner duties and up until now it's primary claim to fame as far as I'm concerned is that there once I found two "extra tall" shops next to each other on the road up from the station. I hope they're still there. 

Anyhoo, we came up to Newcastle for the weekend and it is a lovely place. We found a hotel close to the Millennium Bridge and, although the weather hasn't been the best, we've had a bit of a chance to make the most of the splendid architecture around here. 

As we walked around the riverside I found myself thinking about what's happening in the Fruit Market in Hull. We have a similar waterfront setting and even a fancy bridge or two of our own. I'd love to see the same kind of thing happen where I come from. 

Beamish is Wonderful

We'd never been to Beamish before. People had told us that it's great. Turns out they were wrong. 

It's awesome. 

It's history meets Disney in a wonderful way. Think of something on the scale of a theme park, but with a strong historical strand running all the way through. It has themed areas, rapid transit all around and helpful and enthusiastic staff everywhere. Plus you learn stuff. 

We didn't quite see it at its best, what with the weather and all, but we saw enough to make us want to go back there. 

Very Busy Hardware Group at c4di

We had a really busy Hardware Meetup last night at c4di. Plenty of new faces, and quite a few folks who'd taken HullPixelBot kits and brought them back made up. I showed off the latest software and the HullPixelBot improvements and it was lovely to see so many people on the night. 

I'm going to be releasing some new software for HullPixelBot in the next week or so, to coincide with the first public appearance of HullPixelBot at the Amy Johnson Maker Fest on August the 27th next week. If you want to come along and see what we are doing we'll be in Zebedee’s Yard, Whitefriargate, Hull HU1 2EX along with lots of other folks between 10:00am and 16:00 pm. 

If anyone fancies helping me "man the stand" over the day then I'd love to hear from you. Ping me a message via twitter (@robmiles) or email ( and we can get some kind of timetable together. 

If you want to come along and take part in the hardware group (you don't have to build a robot, but we'd love it if you built something) then you can keep track of the meetups and sign up here

Thanks for the Trombone Tom

I've no idea who Tom is. But he has been reading my blog from 12 years ago. He noticed my lament that I'd failed to find any hits for the search "trombone playing dog" and responded with a link.  Thanks for that. Made my day. 

In fact, things have really moved on. I've just done my own search for "trombone playing dog" and found loads of hits. Such is progress. All we need now is world peace and a cure for cancer.

Hull Pixelbot Version 2.0

I've just released a new set of design files for the HullPixelBot. I've made some improvements and also added holders for the pixel lights (always useful in a pixelbot) and the distance sensor. I was quite proud of the design for the distance sensor holder, until I tried to use it. 

I thought I'd been clever by providing mounting slots for the distance sensors so that the wires could come through the slots for the connections on the back. Turns out this was actually stupid. It turned out to be really hard to make the connections with the hole. 

The new design (which you can see above) has separate holes for the two sensor wires, and they are arranged vertically so you can just connect all the bottom wires together to a common ground (or reference voltage) and then take each of the top wires and connect them to their potential divider resistor and reference voltage (or ground). I'll be doing a detailed post about wiring things up a little later. 

Interrupts Interrupted

I've spent some time writing smooth movement routines for the motors for the HullPixelBot. I want the motor movement to run in the background, so that the program can do other things as the robot moves. This will make the drive very like the behaviour that you get from a traditional "servo" motor that starts turning when the program switches it on.

Thing is, the stepper motors only turn if the program sends the appropriate set of signals to the coils in them. The solution to this problem is to use the timer on the Arduino processor. This can repeatedly trigger a bit of program code at regular intervals using a hardware technique called an interrupt.

Interrupts are used by a computer to respond to real world events. Tapping a touch sensitive screen, moving the mouse or pressing a key are all things that interrupt a running program and cause the computer to run a special piece of code called an interrupt handler which deals with the event. In the case of a key press, for example, the operating system (perhaps Windows 10) responds to the interrupt by sending a keyboard message to the currently active program.

In the case of the HullPixelBot I'm using a timer to produce a sequence of interrupts at regular events which are then used to trigger code which moves the stepper motors to their next position. The code required to do this is quite tiny, and so once the move has been completed the "normal" program can be resumed.

I don't reckon you can call yourself a programmer unless you've written an interrupt handler or two. I've done quite a few and they are rather fraught bits of code. You're not allowed to touch any of the things used by the "normal" program (in case you confuse it), and you must complete your action in the shortest possible time, otherwise you'll bring the computer to a halt. Programming ninjas can write code that uses multiple interrupts from different sources at the same time. 

Which is what I want to do. 

I want programs to be able to use the distance sensor and the motors, and for both of these devices to work using interrupts. Now, I think of myself as a bit of a programming ninja, so I knock out the code and fire it up. And it doesn't work. 

I can have motors, or distance sensor, but not both. 

I'm not surprised by this because it can be tricksy if interrupts occur during interrupt handlers. So I check the hardware manual for the processor and get myself into a state where I'm convinced it should work, but it doesn't. Hmm. Perhaps I'm not a ninja after all. 

So it was back to the start, and a careful re-write of the code to make it as smooth as possible, and remove any ways in which the two handlers (one for the timer, one for the distance sensor) could interact. And it still didn't work. No fair. 

Of course, I eventually figured it out (otherwise you would not be reading this blog post). It turns out that it had nothing to do with the interrupts. It was just that when the program turned the motors on it dropped the voltage level in the robot power supply to such a low level that the distance sensors stopped working. I was testing the code on a machine on my desktop and I'd left the motor power supply turned off so that the robot wouldn't try to run away. That lack of power was my undoing. 

The good news is that I'm now pretty confident that the code I've written is solid, and the HullPixelBot can move in a very nice, precise way, measuring distance values as it goes. And I've learnt something about motor power and distance sensors, which is useful. 

I'll be showing the code off at the hardware meetup on Thursday this week. 

HullPixelBot is going places

I spent a happy chunk of today designing and printing a front sensor assembly for the Hull PixelBot. The new part provides an ultrasonic distance measure and three light sensors. 

This will mean that the robot will be able to find and move towards light sources and also detect obstacles in its path. 

You can find out more about HullPixelBot at the next C4DI hardware meetup on Thursday 18th August. Sign up here (it's free). Anyone can come along and get into building tiny cheap robots. I'll have some more chassis kits to give away. All you need to do is add around 10 pounds worth of parts and you have a wandering pixel bot. 

And if you want to see a bunch of HullPixelBots in action I'm taking a mini-swarm to the Amy Johnson Festival Makerfest in Hull on 27th of August. 

Who knows what they'll be doing by then....

Hull Looks Great

Every now and then I take a picture that I'm really, really, pleased with. This is one of them. I took it today wandering round the waterfront in Hull. This is fast becoming one of my favourite places. The Fruit Market is coming along a treat and interesting cafes and shops are springing up. It's a pity you have to cross the A63 to get to this part of town, but it's well worth a few seconds waiting at a pedestrian crossing. 

I took a few more pictures that I'm happy with. You can find them here

Star Trek Beyond

Star Trek Beyond is a Star Trek film. It's a good one. I reckon it's the first "proper" one of the new movies, because it has a proper element of "boldly go" about it. They really are meeting strange new worlds etc etc. That said, it does have remarkable similarities to the other two movies, which both had a plot where someone tries to take over/destroy everything. But that's Federation life I guess.

For me, the best thing about it was the way that, now we've had a couple of movies to properly establish the characters, we can sit back and enjoy how they interact. The special effects are good, and there are some suitably silly moments too. Go see. 

Candy Chaser Game

This is a neat little game which gave us a diverting few minutes this lunchtime. Each player is trading in a particular type of sweet and players take it in turns to move the price of any the sweets up or down. Once trading is over you have round where everyone tries to figure out who is selling which kind of sweet. If someone works out which sweet you are trading, you are out. If they get it wrong, they're out. Last player standing with the highest score wins. 

Games last around 20 minutes or so maximum. It's quite fun to play, although in typical Computer Science fashion we all massively overthought the situation and I managed to win one by just doing the simple, stupid thing. 

Quite fun. 

HullPixelBot can now turn corners

Spent a bit of time today fiddling with timer interrupts so that I can get fine control of the speed of the motors on the HullPixelBot. Because they are steppers they are quite precise, which means I can get the bot to trace accurate curves. 

The next thing I have to do is put the light and distance sensor on the front (along with a bumper) and then we'll have a proper robot.