Phone Home

image

A student brought me a mobile phone which they found in the lecture today. It was an Android device with a lock screen. I couldn’t do much with it, so I just took it home and waited for it to ring. The first few seconds of the call were interesting as I was a bit worried that the caller might think they were talking to a phone thief and that outside a SWAT team were waiting to burst through the door, spray the room with bullets and prise the phone from my dead and broken fingers.

Perhaps I’ve been watching too much Person of Interest.

Anyhoo, names were exchanged and with a bit of luck they’ll get their phone back tomorrow. One way we could have avoided this would be if the owner had put contact details on their lock screen, so that I would have known who to call. This is not hard to do but it is fiddly, because you have to edit the background image and add the text, and if you change the background picture you have to do it all again.

Of course if it had been a Windows Phone they could have just installed the Lost Phone app on their device, which does all the hard work for them.

This is also a very interesting application because the author, Scott Hanselman, wrote version 1.0 in six hours and also produced a really good blog post about the process and described some good practice when you are writing Windows Phone applications.

Buying Hardware

IMGP0100.jpg

Building the PiArcade table is turning out to be quite fun. It is also giving me an excuse to go out and buy some more tools. Yesterday we went down to ToolStation for some bits and bobs as James had mentioned that their prices are very good.

They are. Their stuff is a lot cheaper than places like B and Q (does anyone actually know what the B and the Q stand for?). The only real problem is that you can’t just wander down their aisles looking at stuff to buy, instead you have to dig out all the part numbers and then write them down. But if you are after some no frills hardware they are worth a look.

PiArcade Table Progress and Compromise

DSCF8849.jpg

Did some more work on the PiArcade table today. I’ve got the right hand joystick all fitted and working, along with the buttons. I’ve also made the holes that will allow the monitor cable to be fitted in the back and I’ve made my first major compromise. You can see it in the form of the four shiny screws that hold the joystick in place above.

I was going to implement a strict “no screws on the top” policy because I reckoned it would look a lot cleaner. But it would have meant a fair bit of extra fiddling, and might have resulted in a joystick that was not as firmly anchored as the one above. So I compromised. I can always paint the screws black, or put a bezel over the top, or just decide not to worry about it.

The only snag that I’ve hit today is that the wires to the second joystick aren’t quite long enough to reach across the table, but a few minutes with a terminal block or two should sort this out.

Campus Open Day (again)

DSCF8843-Edit.jpg
DSCF8839-Edit.jpg 

We had our second autumn open day today. The weather started a bit grey, but it soon brightened up a bit and by the time I left the campus the place was looking very shiny. Two great audiences, thanks to everyone for coming to see us. I mentioned some links in my talk. Here they are if you didn’t get to note them down at the time.

Hull CompSci blog: http://hullcompsciblogs.com/

C# Yellow Book download: http://www.csharpcourse.com/

Departmental Website: http://www2.hull.ac.uk/science/computer_science.aspx

Where Would You Think: http://www.wherewouldyouthink.com/

My blog: /

New Embedded Stuff

There are quite a few new embedded toys that I’ve discovered just recently. Here are three.

image

First up is the DAGU racer. This is a neat little Bluetooth controlled racing car. They’ve got it on discount at RoboSavvy at the moment. It comes with an Android app that you can use to control it, but they also expose the Bluetooth command set so that you can control it from anything, including Gadgeteer I reckon. It is powered by a tiny lithium ion battery and even comes with a set of stickers you can use to customise the racer. And for under twenty quid it was very tempting. So I got one.

image

I got all excited when I first found out about the Electric Imp. This is a wireless embedded device that fits into an SD card socket. You can’t actually use it as a memory card but you can use it to control a connected net appliance. And you can get it for around twenty quid. My excitement dissipated quite a lot though when I discovered that every device is bound to the imp cloud service which is where it registers its data and where messages come from.

I’ve bought these kinds of devices before, my Chumby and Nabaztag rabbit worked in a similar way. The idea of the company behind them is usually that they don’t make much money on the devices themselves, but build a subscription model which lets them pay for the infrastructure by getting cash somehow from the users of each device. Snag is, if that doesn’t work and the company goes bust you are left with a paperweight.The folks behind the imp seem quite confident that they can make it work, and the service is free at the moment. But they are talking about $50 subscriptions for business users and stuff like that, so I think I’ll pass on this, amazing as it is.

image

Now this I really do like. It brings you the best of the .NET Micro Framework, Arduino and Gadgeteer in a single board that costs less than thirty quid. You can feed it five volts and it just works. You’ve got an Arduino shield, three Gadgeteer ports, SD card, USB client and host and a space to put an Xbee or WiFi receiver. I’ve been looking at very simple devices that I’d like to make using the Gadgeteer and wanting a cheap, simple board that just gets things done. The FEZ Cerbuino Bee seems to fit that bill perfectly. For less than the price of a video game you get a device you can program with .NET, connect lots of Gadgeteer devices to and put onto WiFi at a bearable cost.

If you are learning C# and want to dip your toes into embedded development I can’t think of a better start. Lovely.

No Gas

IMGP0082.jpg

At least we have electricity

Came home tonight to no gas. Which in my case (gas central heating) means cold house. A water leak had somehow got into the gas supply and as a result it had shut down.  They are having to dig up the road to find out where the problem is and we’ve turned on the PS3 and are watching Fringe to try and warm up.

Fringe is absolutely top notch telly. Where else do you get lines of dialogue like “So why do you think shape shifting soldiers from a parallel universe are stealing frozen heads?”. Why indeed?

Pi Arcade Joystick Interfacing

IMGP0091.jpg

I’m trying to get the entire department working on my Raspberry Pi powered gaming table. After sterling work by Peter on the cabinet, today it was the turn of James to lend a hand with the button and joystick interfacing. The kit that I’ve bought comes with a USB to button interface (you can see it at the bottom left of the above picture). all we had to do was wire the right buttons and switches to the pins on the interface, connect it to the Raspberry Pi and then remap the controls in the software to use the right switches. And the amazing thing is that we did just that.

By the end of the day we had an arcade game running and the only problem left to solve is getting the sound output to work. At the moment the Pi is putting the sound down the HDMI cable. We need to change this over to the 3.5mm jack socket and then I can get some amplified speakers connected.  At this rate it should be finished well before Christmas….

Hull College Come to See Us

DSC_0097.jpg

Please note that this is not all of Hull College, just the ones that came to see us.

I did one of my “well planned” sessions today. Well planned right up to the point that I found that it wasn’t where I thought it was (Two Lecture Theatre A’s on the same campus? Who’d have thought?) and that the place where it really was has a video project that doesn’t work with my lovely tablet.

Fortunately Martin was there to save my bacon and do his bit before I did my bit, so I had time to go get the less lovely, but actually working, laptop. And I got some laughs, which is always nice. Especially if they are in the places I’m expecting…..

Three Thing Game October 2012

DSCF6374.jpg

I took this picture at the last Three Thing Game during Platform Expo, when we had Imperial  Stormtroopers wandering around the campus, and even going shopping with the kids.

Anyhoo, the time for Three Thing Game is nigh again. We’ll be dishing out the things and getting people writing games in the week from 22nd to 28th of October. Teams of up to 4 students from Hull can sign up and take part. We’ll be having our “Thing Auction” on Monday, where teams can bid for “things” to base their games on. There might even be a special prize for the team with the “Most Valuable Thing”.

Once the things have been awarded, then the development starts. We’ll be running a Rather Useful Seminar on XNA game development in C# for those who are just getting started, and then on Saturday and Sunday, during the 24 hour “crunch development”  we’ll have experts from the MonoGame team showing us how to get our XNA games ported onto Windows 8 and maybe even into Windows Store.

The judging will be on Sunday 28th, when you get to see what everyone else has managed to produce. There will be prizes and, of course, great honour for the winners... Find out how to sign up and learn more about the competition at www.threethinggame.com

Raspberry Pi Tabletop Development

Spent a most excellent afternoon round at Peter’s working on the Raspberry Pi arcade table. I’ve found a cheap coffee table from Argos that should be able to house the monitor and the electronics. Today we were making a hole for the monitor and the joystick buttons.

DSC_0062.jpg

Peter makes the first cut. Note use of a spacer piece of wood to make sure it isn't the deepest...

DSC_0064.jpg

Fitting the monitor in place. Note the little tape tags at the top and bottom. We added those after we discovered that once we'd put the monitor in place we couldn't get it out again without a lot of faffing about.

DSC_0073.jpg

This is the first plan of the joystick and button arrangement. Current idea is to be able to use it from either the side or the ends of the table.  If it doesn’t work, well, I’ve got a spare table….

DSC_0078.jpg

Buttons in place. Note strange ritualistic markings above the buttons that are either where the joystick is going, or something much more sinister….

DSC_0081.jpg

The unfinished finished product.

Hello Mr White

image

Bought a new laptop today. Not for me I hasten to add, but for Number One Wife, who has some writing to do. Her old laptop, still proudly bearing its “Made for Windows XP” sticker, has taken to forgetting the date and time and whether or not it has a hard disk attached. Replacing the battery that causes these memory lapses involves taking the machine to bits and unsoldering and replacing a component with a very very long part number, and to tell the truth I can’t really be bothered.

So, it was off to up town to see what could be acquired at the, ahem, lower end of the market. And we happened across the beast above. It’s made by Asus, has a processor which will do the job (word processing, surfing the net, maybe a bit of Skypeing), 4G of RAM, a reasonable sized hard disk and even a USB 3 port on the side. It doesn’t have an optical disk drive, but I can live without that. And you can get it for less than 300 quid. Even managed to buy it from one of our students, who works in Currys Digital up town.

I took it home, and once we had got over the 36 updates it wanted to install, cleared off all the rubbish littering the disk and installed Microsoft Security Essentials it works a treat. The battery life is not stellar, but it has this really nice multi-touch mouse pad that lets you scroll and zoom really easily. A properly useful device for rather less than the price of an iPad.

When Number One Wife goes out I might even pop Visual Studio on it and see what it would be like for developing Windows Phone applications.

Debugging Conditions

IMG_5091_2_3.jpg

We had our first programming lab proper today. Conditions and statements. Great fun. The aim of the exercise is to decide whether or not a given customer can see a movie at your multiplex. The inputs to the program are the age of the customer in years (age), and the number of the movie that the customer wants to see (filmNo). Movie number 1 is Looper (which is apparently quite a good film). In the UK you have to be at least 15 years old to see the film. Quite a few students wrote code like this, which makes very good sense:

if (filmchoice == 1 && age >=15)
            Console.WriteLine("Enjoy the film");

The condition will fire when the customer has chosen film 1 (Looper) and their age is greater than or equal to 15, which is just fine. However some folks then decided to improve the program to add the message that says “You are too young”. And they used the else keyword to achieve this:

if (filmchoice == 1 && age >=15)
      Console.WriteLine("Enjoy the film");
 else 
       Console.WriteLine("Access denied - you are too young");

This seems to make sense, but we now have a problem when we finish off the program. People start being denied access to films when they shouldn’t be. In fact they see lots of denied messages, which is very confusing.

The problem occurs because the program can enter the above statement in one of four states:

  • Film is Looper and age is greater than or equal to 15
  • Film is Looper and age is less than 15
  • Film is not Looper and age is greater than or equal to 15
  • Film is not Looper and age is less than 15

The if condition above will fire if the program is in the very first state (which is what we want if the customer can see Looper) but the else part will fire in all the other three states, leading to “Access denied” messages when we really don’t want them. One way to solve this is to split the program into two tests, so that the age test only takes place once the program has decided that the customer is seeing the Looper film.

Actually, there are lots of ways of addressing this issue. For me the interesting thing is that you need to be careful when you take a tiny piece of code that works fine (the original test) and then add a bit extra to it. Your program must handle all the input possibilities, not just the ones that constitute the “Happy Path”.

The Pi has Landed

DSCF8836.jpg

Raspberry Pi and Raspberry Yoghurt. And a Red Rocket, that looks like it has been Photoshopped on, but did actually fly past as I was taking the picture.

I’ve now got a Raspberry Pi! I got it from Cameron, who also very kindly supplied me with an HDMI to DVI adapter so that I can plug the Pi into a monitor in my office. It fired up a treat after I had built an SD card with a copy of the operating system. Looks very nice and works well. I’m trying very hard to remember all the Unix commands I used to know so that I can drive the thing.  In case you were wondering why I’ve bought a Pi (as if being me wasn’t enough reason), this will be the beating heart of my video game coffee table, which is now taking shape. I even went down to Argos and bought a couple of coffee tables which will be used to hold the monitor and the other gubbins. Tomorrow we are going to have a go at connecting the joysticks to the Pi and try to run a Mame game or too. Should be a fun way to spend a lunch break….

First Rather Useful Seminar

image

We had our first Rather Useful Seminar today. Loads of people turned up. I would have taken your picture folks, but in the excitement of the moment I forgot. I did remember to give away a prize though, the fabled “white rocket of happiness”.

Next week, same time (1:15) and place (Lecture Theatre D) I’ll be giving away another prize. A free copy of my Kinect book. This is actually quite appropriate, as the session is all about Kinect development. I’ll even sign it if you like.

You can find the entire programme of events for the run of Rather Useful Seminars, along with the slide deck for this week’s presentation,  over at www.ratherusefulseminars.com.

Rob at the Round Table

DSCF8830-Edit.jpg 

You can’t say I’m not versatile. A couple of weeks ago it was Cottingham Women’s Institute, tonight it was the local Round Table who had invited me to speak. So, in my smart suit (but not quite as smart as the folks above) I turned up at the Hallmark Hotel to try my hand at after dinner speaking. Or in my case, after apple crumble speaking as I didn’t get there in time to eat the whole meal….

I’ve not done this kind of thing before (I hope this didn’t show too much). I’d carefully prepared some notes that I thought might go down OK, but thanks to SkyDrive not synchronising them properly (can you see a pattern forming here?) I’d not had as much time to work on them as I was planning too.

Anyhoo, thanks to a great audience, who even managed to laugh at quite a few of the the jokes, I made it through around 20 minutes of “not quite as well prepared as it might have been” mayhem. Thanks for inviting me folks. And the apple crumble, to say nothing of the entertainment that followed my talk, was splendid.

Postgrad Welcome Party

DSCF8820.jpg

These folks won the quiz.

Tonight it was time for the Postgraduate welcome party. We did pretty much the same thing, with Rock Band, Wii Sports and of course the massive car racing track. We also nearly had exactly the same quiz questions, thanks to SkyDrive not updating the files correctly. Anyhoo, fun was had; once I’d shot back to my office and emailed the Powerpoint deck through to myself….

DSCF8821.jpg

These folks came second. In spite of because of Simon being on the team.

DSCF8824.jpg

These were in third. An still look pretty pleased.

DSCF8822.jpg

I'm not convinced that these folks actually did the questions. Perhaps we need bigger prizes…

Rather Useful Seminars

DSC_0048.jpg

I'm organising a sequence of "Rather Useful Seminars" for this Semester. These will be for any students in the department who want to come along and learn stuff that might be rather useful. You can find more about the seminars here:

 /rather-useful-seminars

The first one is this Wednesday at 1:15 pm in Lecture Theatre D (LTD) in the Robert Blackburn Building. It is about participation in the Microsoft Imagine Cup. This is a student competition in which Hull has had a lot of success, and I'd like to have some more.

Captain Scarlet at the Movie Buff’s Fair

DSC_0037.jpg

After the Open Day yesterday I went into town (which was an adventure in itself) and dropped in at the Movie Buff’s Collectors Fair that they were having in the Prospect Centre. Lots of people dressed as Storm Troopers and other Star Wars characters were in attendance. I wonder if they ever have a situation where two Darth Vaders show up at the same time. Surely that would cause great disturbance in the force, among other things…

Anyhoo, they also had lots of stalls selling “collectables”. Including this pair, in very good condition, although they were minus their guns (which I plan to have a go at printing). Just as a pop quiz, which of the two do you think is the baddie? And no, they are not holding hands.