HullPixelbots racing at Techdays NL

We had an amazing session today at TechDays NL. I was talking about the use of the Microsoft Bot framework to control physical robots via the Azure IoT Hub. I had a couple of robots linked via MQTT to the cloud and delegates could use a web interface to a chatbot to try to drive them around the room.

This was the web interface we were using. Half of the room was controlling the red robot and the other half were driving the white one. It was quite fun to watch as the robots inched towards the finish line. Eventually the white robot managed to win and one of the white team was awarded the big prize of a HullPixelbot platform.

The slides for the presentations will be available via the TechDays NL site soon. I'm also going to post all the source code (minus all the keys and passwords) next week. 

A tense moment in the race

A tense moment in the race

Would you buy a used HullPixelbot from this man?

Would you buy a used HullPixelbot from this man?



Using a Raspberry Pi as an Access Point with Windows 10

I've got a few things running for my TechDays sessions next week. They are working fine on my home network. Now, I know that the conference will have WiFi, but in my experience this can be problematic. Sometimes they use browser based authentication steps which are hard to replicate on a device with no screen, keyboard or mouse. 

But I have a plan. I've got a portable access point that I use on occasions just like this. I know exactly which shelf it is stored on, in a nice little case and everything. So I go and grab it. Of course it's not there. It's not anywhere. Blarst.  

However, I do have a Raspberry Pi 3 which I was planning to take along as well. And it turns out that it will work as an access point too. And setting it up is a dead doddle. I started with the howto here. That got me the Windows 10 IoT Core Dashboard which is an awesome little program that will create an SD card to use to boot your Pi and then take you through connecting and configuring it. The great thing for me is that it lets you use a "naked" Pi, with no keyboard, mouse or screen. All the configuration can be done via the browser based control center. 

If you want to turn your Pi into an access point just head for the IoT Onboarding page you can see above, select a suitably obscure SSID and password and then save them. (I'd advise against the defaults). After a reboot you should have an access point which clients can connect to. 

If you want to share the wired network connection from your Pi you have to actually turn this on. The user interface here is a bit rubbish to be honest. There's nothing I could see that indicates if the sharing is on or off, and you have to make sure that you connect the right adaptors at each end. Which is why you might find the screenshot useful. Just select the items that you can see in the "Access point adaptor" and "Shared network adaptor" and then click the "start shared access" button. And then it all just works. Awesome. 

One tiny gotcha. On my Pi the SSID gets a bunch of hex characters added to it.  HullSSID would probably change to XY_HullSSID_ED50. Browse for the WiFi connection with another device before you put the text into a client program.

Building a Joke Alarm for Techdays

I'm doing a couple of sessions at TechDays next week. I'll be showing off a few HullPixelbots and a "Joke Alarm Button" device. The idea is that if I every say anything funny I can press the button and tell the world via Azure. I've no idea how I'm going to test it. 

I've fiddled with the software and now it's time to build the hardware. I've had the box for ages. It is large, yellow and has a big red button on the top. Today I thought I'd put something behind the button. The active component is my favourite device of the moment, the Wemos D1 mini. So I got one, programmed it up and connected it to the light in the button, expecting a light to brightly illuminate the button in an "impress the audience" kind of way. 

It was rubbish. A weedy little led that I could hardly see.

By now I was coming to the conclusion that today was going to be one of those "hard fought" days. By that I mean that everything I try to do will be difficult. Pin numbers will be wrong, leds will be wired the wrong way, some things won't work. And I'll probably burn my fingers at some point. 

First thing I tried was to add a little amplification to the led. The esp8266 is a wonderful device, but it doesn't put out much power. So I popped in a transistor to add some amplification and waited to be blinded. I wasn't. So next I found a larger led. Still rubbish. By now I'm getting worried. There's no point in turning up with hardware if it's not going to impress. 

So I fell back on technology that's served me well in the past. I dug out one of my neopixel rings and dropped it inside the button as you see above. Of course this was difficult. I had to dismantle the button. Then I had to fit the ring. The screws that I used fouled the button movement so I had to resort to the glue gun to fix the ring in place. And of course I burnt my fingers. Then I assembled it the wrong way round, wired it to the wrong pins and generally failed all over the place. But eventually I got a happy ending. 

The neopixels can display lots of colours, but of course the thick red plastic button means that only red works well. Never mind. I can do fancy animations and you can definitely tell when it's lit. 

The button switch itself was easy to wire up, although at one point my test software convinced me that it wasn't wired correctly. Anyhoo, I'll get the software hooked up tomorrow. 

I just hope things won't be quite so difficult. 

Coding is Fun at Techdays

Well, that was fun. Turns out that you can drive down to Reading, do a TechDays session and then drive back all in one day.  It was quite hard work, but it was nice to visit Thames Valley Park again. I've been there quite a few times over the years.

Anyhoo, the session was a hoot. Thanks to Martin for doing an excellent job of keeping me on the straight and narrow. The sessions were all recorded and should be released onto Channel 9 later this week. 

Preparing for TechDays tomorrow

I'm doing a presentation at TechDays Online tomorrow. So of course tonight I'm working on the code for the final demo. I've got three copies of Visual Studio running above. One talking to the robot controller Arduino, another driving the robot network esp8266 and a final one building the Universal Windows Application that will control everything. I've not had so much fun in a while. 

I'm on tomorrow at around 4:00 pm. Tune in and find out how far I got........

..the robot with two brains....

..the robot with two brains....

Reading "Forbidden" Web Pages with C#

In my session at Techdays last week I was showing how to make an asynchronous method that reads a web page. I was bemoaning the way that my method worked for but not for the wonderful site that is When I try to read "my" page the request fails with a "403 Forbidden error".

Well, many thanks to Erik van Telgen, René Vermijs and @HenroOnline who all came back with the answer. Turns out that, unlike the liberal BBC, my blog host insists that that any read requests come from browsers, not programs. Fortunately it is easy to modify the web request to appear to be from a browser, and so get the Html back.

public async Task<string> GetPageAsStringAsync(string url)
    HttpClient x = new HttpClient();
        "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)");
    HttpResponseMessage response = await x.GetAsync(url);
    string content = await response.Content.ReadAsStringAsync();
    return content;

This version of "GetPageAsStringAsync" returns the contents of a page and impersonates a browser when it does it.

string site = await GetPageAsString(@"");

It's very easy to use, as you can see above. And this works perfectly. Many thanks for your help folks.

I really hope that I get invited back to Techdays next year, I'm sure by then I'll have another bunch of technical problems I can get help with...

TechDays Sessions Fun

First Great Audience for the Universal Application Session

First Great Audience for the Universal Application Session

I don't know what it is about audiences from the Netherlands. But they are around the best in the world. Up for anything, attentive and just generally fantastic.

Await and Async audience

Await and Async audience

Both sessions seemed to go really well (at least most of the jokes got appropriate laughs or groans). I've passed the slides and demo programs over to the conference folks and they should be available soon. I'll post them here on the blog (with a bit of extra howto stuff) next week as well.

Thanks to the Techdays crew for inviting me. I was in the Hague for just about 24 hours, but they were lovely...

Flying to TechDays

Flew out to Techdays today. The weather was nice and now I'm allowed to use my phone all the way through the flight I did just that. This was the view from the plane as we flew over the UK coastline.

My sessions are tomorrow, but tonight we had a dinner in the Speaker's Lounge which was great. I was able to catch up with lots of folks I've not seen for a while. Good to see you all again.

The bags the are giving the delegates this year are really nice, and the speakers get one each too. And the speakers lounge has some very groovy furniture.

Rob at TechDays NL

I've been doing sessions at TechDays for as long as I can remember. Including the one I'd rather forget, when Every Demo Failed

And I'm very pleased to be able to report that I've been invited back again. This time I'm giving a couple of talks, one about the use of asynchronous operations and the other about the creation of Universal applications for the Windows Platform.

I love speaking in front of audiences from the Netherlands. They are always great fun. And so I'm looking forward to the end of May, when I'm going to get to do it all over again.

Home via Escher

They serve the best breakfasts in the world in these parts. Amazingly good. With freshly squeezed orange juice and everything. And after we had enjoyed the meal we headed off to the Escher museum in the middle of The Hague. 

Escher pictures are amazing. I first came across his work in the book Gödel, Escher, Bach: An Eternal Golden Braid, which is one of the best books ever written. Ever. Read it. Now.

It was nice to see his original work and find out a bit more about the chap behind the pictures. The exhibition itself is in the rather sumptuous surroundings of a palace. And on the top floor they have some rather neat interactive artworks too. A great way to spend our last morning before we caught a train and plane and headed home. 

Monogame at TechDays

This is the audience getting ready for the presentation.&nbsp;

This is the audience getting ready for the presentation. 

Sage advice

Sage advice

I did my final presentation of TechDays this afternoon. I love working in the Netherlands. Yesterday I celebrated my arrival on stage by kicking one of the lamps and breaking the bulb, in the process fusing all the lights. This made for a rather fraught five minutes for the tech guys, who had to find and replace the fault part. Then, during both of the presentations yesterday I was continually tripping over the lights and moaning about them. (Moaning is one of the things I do best. Today I arrived to do my presentation to find this thoughtful warning on the lamp in question. And the thing is, it worked. I didn't touch the lamp once. The audience was, as usual, great. I reckon that Dutch audiences are around the best in the world (and I've seen a few). They are up for anything, and are very happy to be in on whatever joke is going around.

I was talking about MonoGame on Windows 8.1 Phone and PC. Some of the demos were a bit reluctant to work, mainly because I'm presently running two development environments (VS 2012 and VS 2013 RC2) on my trusty Surface Pro 2. These kept grabbing the wrong files and then discovering that they didn't work. But in the end everything came right. You can find the slides and all the demos here


This is a really nice part of the world. Amsterdam is great, but I reckon The Hague beats it in terms of pace of things (a bit less frantic) and a lot fewer tourists (or at least that is how it seemed to me. They even have trams that go on the grass. 

(Note that this is not a cunning drugs reference.)

Early Birds at TechDays 2014

Some of the early birds who caught my first session

Some of the early birds who caught my first session

I must admit I wasn't convinced about the plan to start the TechDays sessions at 7:45 in the morning. Particularly as to my UK body clock this meant 6:45... I wondered to myself if anyone would actually turn up. But they did. I had a very good turnout and the session turned out very well. Thanks to being such a fantastic, and wide awake, audience folks. The subject of the talk was Windows Phone 8 Bluetooth and Near Field Communications (NFC). I've put the slide deck and the sample code here. There are demos, sample code and all kinds of stuff. And around 110 slides....

In the afternoon I did my second session of the day. This was the fun hardware one. This had all kinds of scary demos, which ended up working which was nice. I had my Windows Phone devices all talking to Arduino controlled lights and stuff. You can find all the slides and demos here


At the end of the session I took a picture of the audience. Thanks for coming folks.

Software Upgrades and Theft

I'm away from home. Network connections in the hotel are a bit dodgy. I'm giving a talk at a technical conference where I'll be expected to have the brightest and latest software on display. And so of course the latest Windows Phone 8.1 release becomes available to me today.... 


So it was off to Starbucks for a coffee, some quality wifi and a firmware upgrade. It took a little while, but it is a tribute to the phone team that it all went swimmingly well. All my applications, media and settings made it across the upgrade and everything is where it should be. And there are some lovely new things to play with.  

This is just outside our hotel. Very nice.

This is just outside our hotel. Very nice.

Once the upgrade was complete we headed over to the station and caught the train to The Hague. 

And somebody stole my suitcase. 

It seems that there is method behind the constant "Don't leave your luggage unattended." messages that they play at stations and airports. Because if you do it will probably be stolen. This put a bit of a downer on the day, although all the miscreant got away with was a bunch of over-sized clothes, some dirty.  All my technology was in my backpack and that never leaves my sight.  The good news is that the hotel is splendid, and while we were out looking for replacement clothes for me we found a smashing little town centre just a short walk from where we are staying. 

Beer and Culture

We started off today with a trip to the Rijkmuseum. They have some superb pictures here, including the Night Watch, although it was a bit busy.

After lunch we headed for the Heineken Experience, a somewhat less cultural experience, although it did involve yeast. Fun fact of the day, the text in the Heineken logo was adjusted to create "smiling e's".

This probably doesn't improve the flavour very much, but it makes the brand look a bit happier.