Tricopter Nerves
/Number one son was around over Easter and spent quite a chunk of time building a tri-copter. This is like a quad copter, but operating in reduced circumstances as far as rotor count is concerned. However, in some ways it is more interesting to fly, because the third rotor is pivoted so that you can use it to vector the thrust in a way that quad copters can't.
Anyhoo, he started with just three bits of wood and a bag of motors and controllers and stuff, and I printed some parts to help hold it all together. By this evening he was ready to take it out into the field and see what happens.
The answer, on this occasion, is not much unfortunately. Although the good news is that everything is plumbed together fine and it all worked as expected, the bad news is that a different kind of propeller will be required. I'm a bit sad that I won't be able to see the maiden flight of the device (it goes back down south tomorrow), but I think there is a good chance that it will come back to Hull in one piece at some point in the future. And I'm seriously tempted to have a go at building one myself.
Windows Phone and Trams
/Windows Phone and trams go together very well. Last week, whilst on unfamiliar territory in the Netherlands, I needed to find the way to Escher museum. Windows Phone gave me all the details very quickly and I can even pin my route to the Start menu so that it is easy to refer to. Very useful.
And of course with the map already downloaded before we set off, I was able to navigate quite happily in spite of having no network connection for the phone.
Windows Phone 8.1 Cortana Marketplace Tip
/If you have upgraded your Windows Phone to version 8.1 (and you should if you are a Windows Phone developer) then you will have found out about Cortana. She is the Windows Phone equivalent of Siri, with one or two significant improvements on the genre. Snag is, she is only available to Windows Phone users in the USA at the moment.
The good news is that you can get Cortana goodness on your phone from anywhere in the world, just by setting your region and language to USA. The bad news is that this stops you from being able to buy things from the Windows Phone Marketplace (although you can still get updates to installed programs).
However, there is a workaround for this if you happen to have a second Windows Phone. Leave that in your home region and then use it for all your purchases and you will then be able to "re-install" them on your Cortana enabled, USA region, device.
Update: Actually I think it might be even easier than this. Remember that you can buy applications and games for your phone via the Windows Phone website.
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
/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
/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.
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.
Heading for TechDays via Amsterdam
/We are having a day or two in Amsterdam before heading off to TechDays in The Hague. So we hopped onto to the plane at Humberside and headed off to Schipol. After a quick train journey we checked into our hotel and then headed out for a walk. Of course I took the camera.
Tooltip from Amsterdam...
I really do like it here.
Nest Controller
/I've fancied having a Nest controller for a while but they've only been available in the 'states. Then this week I found out that they are now out in the UK. It's taken a while for them to arrive here, mainly because of the differences between US and UK heating systems.
Mine arrived yesterday, complete with a set of instructions on how to install. I'm very tempted to have a go, but this would probably be a daft thing to do just before we go away for a week or so. But I think it will make a nice Easter project.
Plenty of Bluetooth
/If you want to connect your Windows Phone to any kind of hardware I can strongly recommend the HC-06 Bluetooth adapter. I've found it to be very easy to connect to and it works "right out of the box". It plays a major part in my TechDays presentations. You just connect the devices to a power supply (from 3.3 to 6 or so volts) and then your device (usually an Arduino) can talk to the adapter over a serial connection which by default is set to 9600 baud.
The connections to the device are only supposed to work at 3.3 volt levels but I've had no problem using the 5 volts signals that the Arduino produces.
You can change the name of the device by sending it commands, but you can pair any number of them with a single phone and then when your program runs it will connect to the first one it finds.
You can find these devices very cheaply on places like eBay. Search for "Arduino HC-06" and you should find quite a few. If you are prepared to wait for them to arrive from China you can get them very cheaply, but beware of buying ones marked as "carriers". These are very, very cheap but they actually don't have any chips on them...
Rainbow
/Storing Constants in Arduino Programs
/Welcome to another of my "I put this into my blog because otherwise I forget how to do it and have to go onto the net and find out again" posts.....
I really like writing programs for the Arduino platform. The good news is that the devices can do a lot, but the programs themselves are actually very tiny. The bad news is that you are working in an environment where there is hardly enough of every kind of resource. Particularly memory.
In an Arduino there are two kinds of memory. There is RAM (random access memory) which is where your program stores the variables it is working on at any given time and there is EEPROM (Electrically Erasable Programmable Read Only Memory) which is where the program code lives. When you put your program into the Arduino it is stored in the EEPROM part and runs from there. If your program creates any variables, these are stored in the much smaller RAM.
If you want things like large look up tables (which would usually be stored in the memory of your computer) then you are heading for trouble, as you only have a strictly limited space to store data values. Fortunately you can move constant data into the program memory of the device, so that it doesn't need to be stored in the precious data space.
const byte big_lookup_table [] PROGMEM= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
The statement above creates a big (actually not that big, but you get the picture) array of bytes that I've called big_lookup_table. I've added the modifier PROGMEM to tell the compiler I want the table to be located in program memory, not RAM. The table could be quite big (an Arduino UNO has around 28K of program memory available as I recall), you could save things like sound samples or images here if you wanted to.
The only slight complication is that when you want to get hold of the elements in the array you can't just directly access them. Instead you have to use a macro which will do the fetching for you.
x = pgm_read_byte(&big_lookup_table[i]);
The statement above takes the element at location i and fetches it into byte variable x. This also means that fetching data from program memory is a tiny bit slower than "normal" variables, but in practice you don't notice the difference.
Rob at Tech Days 2014 NL
/In a few days I'll be off on my travels again. I've done sessions at TechDays in the Netherlands for as long as I can remember, and they are always great fun. Even when all the demos fail. This year I'm doing three:
- 16 April 2014
07:45 - 09:00
Bluetooth and NFC phone to phone communication - 16 April 2014
14:50 - 16:05
Talking to hardware with Windows Phone - 17 April 2014
13:15 - 14:30
Creating games for Windows 8 and Windows Phone 8 with monogame
For the hardware one I've got flashing lights and all kinds of good stuff, and I'm really looking forward to telling folks about the wonders of MonoGame. And there will be special treats for the ones who turn up at the 7:45 am session to find out all about Phone to Phone communications. If you are coming along to the conference I'd love to see you. I've even written some new jokes..
No Mr. Bond. I expect you to fry......
/Feel quite a bit better today. Well enough to watch some telly. It's Sunday afternoon, and so that means that ITV will be showing a Bond movie. And they are. "The Spy Who Loved Me". One of the worst ones in my opinion. But at the very end I saw something that piqued my interest. The last part of the credits was given over to mentions of people the producers wished to thank. This is the list of sponsors who have given money for product placement. All the usual suspects were there, Lotus cars, Seiko watches, etc etc. And right at the end: "North Thames Gas Board".
North Thames Gas Board? What on earth did they do? Perhaps they were mentioned in early drafts of the script:
Scene 67: James Bond's apartment. James and an exotic Russian spy are having a candle-lit dinner. The exotic spy (her name is not important) looks up from her caviar vol-aux-vents and speaks:
Exotic Spy: 'James?'
Bond: 'Yes, my darling?'
Exotic Spy: 'This food, it is so delicious. Did you cook it yourself?'
Bond: 'Yes, my darling.'
Exotic Spy: 'And tell me, what is your secret to achieving such fantastic flavours?'
Bond: 'Well, er, actually, its all about the gas that you use......'
Scene 210: Evil lair. Bond and the exotic spy (her name is still not important) are tied together on the end of a long rope which is hung over an enormous, fiery pit. The evil villain (his name is not important either) addresses them from a control room full of shiny sponsored machinery and expendables in brightly coloured boiler suits:
Bond: 'You won't get me to talk you know.'
Evil villain: 'I think I will. You see that fiery pit below you...'
Bond: 'What of it?'
Evil villain: 'Do you want to know what kind of gas I'm using.......'