Final day in Iceland

Last day in Iceland today. We visited the capital city which seems to be less like a capital city than pretty much any other place I’ve been. There is some stunning architecture, some lovely art galleries and a whole slew of souvenir shops (almost as many as there are in Whitby) but there was not the level of hustle and bustle that I have seen in most capitals. Not that this was a bad thing, it was nice just to be able to saunter round from one really nice place to another.

Home tomorrow. Oh well.

Keflavik and the Blue Lagoon

Today finds us at the very edge of Iceland, up past Keflavik at the Garður Old Lighthouse which also hosts a really nice restaurant. The weather is trying to make amends for being super wet earlier in the week, not that it has stopped us doing much but it does rather spoil your photographs when you can’t see the top half of the sky for cloud. Anyhoo, this is an amazing place. Even better in good weather.

For the afternoon we headed to the Blue Lagoon, a hot spring that is a “must visit” in the same way that Disneyland is a must see if you ever go to Florida. Just like Disneyland it was expensive, but the experience was worth it. You are out in the open in cloudy blue water that is around the same temperature as a warm bath. Apparently the minerals in the water are good for your skin. There are also mud packs which we tried (they were included in the package). The consensus of the folks around me was that the mud pack didn’t do much for me. The only comment of note was that I looked slightly less scary once I had washed it off.

The spa is surrounded by amazing landscape.

Travelling the Golden Circle

What with me now being a confident Icelandic driver we thought we’d spend today driving “The Golden Circle”. After “sanity checking” the route with the ever-helpful hotel staff we headed off into the unknown on the wrong side of the road….

Actually, I’ve decided that it is not “the wrong side of the road” if everyone is doing it. Not that this is stopping me getting this ghastly frisson each time I see a car coming towards me on the “wrong” side. Then I realise that I’m on the wrong side too, and all is well. Roundabouts are a challenge though, it feels as if I’m deliberately turning into the face of oncoming traffic when I enter one.

Anyhoo, we set off with a bunch of locations programmed into the phone. It all worked splendidly,. I’d taken my venerable old Fuji FX100 camera and managed to get some reasonable pictures. You can click through the images to larger versions on Flickr if you are so minded.

Heading to Iceland (not the shop)

We were up bright and very early this morning to fly to Iceland. Silly me, I thought that because our flight left at 6:30 am the airport would be pretty much deserted when we arrived. Not so. It turns out that, probably because of airport fees or something) that the place was absolutely packed at 5:00 am. Folks were downing lagers and bottles of wine in preparation for their trips. Good for them. We made do with a coffee and a bun.

Never been to Iceland before. We’re staying at a little hotel just outside Reykjavik for a few days. We’ve hired a car too (such bravery). Should be fun. We’ve already discovered that there is a waterfall a few minutes walk from the hotel.

Raspberry Pi Model 4

I remember when the Raspberry Pi was first announced. A credit card sized proper computer which cost 25 quid? A likely story.

Twenty five million sales later, the story is looking more likely than ever. And now we have version 4.0. This version is interesting for a whole bunch of reasons. They reckon it has around twice the speed of the previous version, and you can now get it in memory sizes that go from 1 to 4 Gbytes. It now supports two monitors and 4K video output (although its a bit tricky if you try to use both at the same time). It also has two USB 3.0 sockets and the specs speak of much faster data transfer. The mounting holes look to be in the same place, and the pin-out for the “hat” connector is the same, although the pins can be re-purposed to get some extra I2C and serial ports which is very welcome.

The bad news is that there are a few “breaking” changes from the previous device. The video sockets are now micro-HDMI and there are two of them, which means that case designs will have to change and you’ll need to change your video cables. The power is now supplied via a USB-C socket and you need a bit more of it. The days of hanging a Raspberry Pi off a USB socket on a PC may be over. And if you want to get full speed all the time (or play with overclocking) you’ll need to add cooling to prevent the processor slowing down when it gets too warm.

But this does mean that you can consider using the Pi as a desktop replacement. I know they say that with every new release of the platform, but this time it might actually be true. The extra ram will make it possible to multi-task with ease, and the faster USB sockets mean you can connect fast hard drives too. However, having said that, I reckon that the extra power is interesting because it makes it easy to use a Pi as a proper “edge computing” device. It should be very possible to run some proper AI on this platform, allowing you to put a lot of computing power right next to your sensors, which makes things very interesting.

I can’t find any word from Microsoft as to whether the IoT version of Windows 10 will be ported to the Raspberry Pi 4. I really hope that it will be. Windows 10 on this platform would be awesome.

I’ve ordered myself a device, I’m looking forward to it coming and having a play.

A Lora Gateway of my own

I’ve been playing with LoRa for a while, and I’ve even got a tiny single channel gateway at my house that mostly works.

But last week Adam loaned me a proper The Things Network LoRa gateway to play with.

It’s awesome.

For a start it has a proper 8 channel receiver. This means that it can receive all the messages. For another thing, it has a proper antenna. The result has been that over the air authentication (which used to be hit or miss) works first time. And I can reliably send messages back to the LoRa device when it checks in.

Suddenly all my sensors are reporting results with rock solid quality of service.

I really hope Adam doesn’t ask for it back in a hurry…

Cables for a pound each

If you’re looking for some cheap cables I can recommend you wander down to your local pound shop. I’ve been using their cheap usb cables for a while and they work a treat. They are especially useful if you want to connect up a Wemos or Heltec device to a power supply. They have a good length, 1.5 m, the connectors are sturdily attached, they are packed in a nifty little bag and they only cost one pound each.

Astonishing.

I’ve also been using their one pound HDMI cables and they seem to work fine. It seems that electricity doesn’t mind the price of the wires that it travels down…..

Try Microsoft Edge Insider

If you like Google Chrome I think you’ll like what’s happening to the Edge browser. The latest versions are being based on the same rendering engine. I’m using the latest dev build as my “daily driver” browser at the moment. It seems snappier than Chrome, has some interesting new features and I’m fairly sure it is not sending details of all my browsing back to Google high command. Which is nice.

If you want to have a go, and I think you should, you can download different flavours from here.

Azure IoT Devkit

Image shamelessly stolen from the IoT Devkit site…..

At the talk yesterday I mentioned the Azure IoT Devkit. This can be used as an IoT Endpoint for Azure among other things and has the benefit of a properly secure architecture including proper security to prevent details being stolen from the device or the device being compromised by naughty firmware. It also has a nice little OLED screen and a whole bunch of useful sensors.

You don’t develop for this device using C# and Visual Studio, but you can use the awesome Visual Micro or Visual Studio code to work in C++.

It’s a great place to start creating proper cloud connected devices.

Insider Dev Tour Hardware Mayhem

Picture of a missing train

I should have expected trouble when I discovered that my first train to Manchester didn’t exist. Even though the station display confidently predicted its arrival, and the app on my phone showed a dot moving down the rail line the actual bit lump of moving metal failed to turn up. Not impressive.

Fortunately, I was able to catch the next train (which did exist) and then make it to my connection with literally seconds to spare. Then all I had to do was walk through a cloudburst to the venue in Manchester.

Once I was inside and dried out, things improved a lot. Free coffee and some great sessions. I’d bought a whole bunch of hardware with me and I planned to spend my lunch hour setting it up and making it work.

I got all the way to the end of the setup and then my demonstration Raspberry Pi decided to fail completely. No idea why. Life I suppose. Perhaps last night fate heard me thinking “No need to take a spare device, it all worked fine in London”. Anyhoo, even rebuilding the entire operating system failed to bring the machine back to life and anyway, it seemed that the rather picky video display at the venue refused to talk to the Raspberry Pi at all.

Fortunately I had a plan for this too. It involved my LogoBlaster. In the end I was able to do the Raspberry Pi presentations using the projector on the LogoBlaster to show everyone how a Windows Universal Application can interact with hardware and Azure services. Thanks to Luce and Pete for holding up various devices and helping me get it all to work.

A very patient audience. Thanks folks

If you want to play with my demos, you can find them all here.

You can find all of the Insider Dev Tour lab conten (there’s tons of good stuff) here.

Insider Dev Tour London

A happy audience at the start of my session. Aren’t they always…

We took our Manchester Insider Dev tour to London today. I was there with a Raspberry Pi, the Logo Blaster, and my trusty Surface Go. I’d made all kinds of plans for network and video contingencies, and I was very pleased to find that they had two (yes two!) wired connections and a really fancy video switching system, along with a bunch of fantastic tech folks who knew how to make it all work.

All the sessions I saw were great. I always leave these events with lots of thing to try and ideas for building stuff. When it came to my session I managed to get everything to work eventually. The Surface Go got there in the end, and left me plenty of time to tell all (both) of my wonderful jokes.

Many thanks to the XamlLlama for stepping in when I realised I’d forgotten my mouse to trigger the cognitive services demo and even providing a winning smile for the camera (that was even recognised correctly).

For those who were there yesterday I’ve put all my code up on GitHub here.

On to Manchester on Thursday.

Bandwidth idiot

So, today I’m doing the final tests for my sessions this week at the Insider Dev tour. My plan, such as it is, involves hanging all my devices off the mobile hotspot in the phone. I was testing the whole workflow, including creating a new Windows 10 image for the Raspberry Pi. While I was doing this I noticed that the network was a bit slow. Not painfully so, just slower than I expect in my Lighstream powered house.

Of course, it turned out that I’d done the entire exercise, including fetching the Windows 10 image, on my phone. This is both impressive (it’s nice to know that you can do this kind of thing over a phone network) and potentially expensive (I’ve no idea how close this has taken me to my limits for the month).

Soak testing air quality sensors

For the last few weeks I’ve had four air quality sensors sitting on the windowsill in the house that faces the nearest LoRa gateway. I’m soak testing the devices prior to putting them on lamp posts around Hull.The air quality in that room must be one of the most highly measured in the county.

Anyhoo, one of the devices decided to try and spoil Fathers Day today by falling off the LoRa network. It was one of those situations where I really hoped that it was properly broken. There’s nothing worse than something that goes wrong every now and then. Unfortunately the darned thing came back to life at the end of the day, and so we are going to replace the CPU. My number one suspect is the antenna connection, but we’ll have to do some tests to prove this.

And no, it didn’t spoil the day. Had a lovely meal out and got some splendid presents.

Making a PAX counter

PAX counter and plastic pig

PAX is an abbreviation for “passenger”. A PAX counter is a device that counts passengers, although you could use it to count people in lots of other situations too. One way to count people is to detect the devices they are carrying. I’ve built the PAX device above from the code here. It’s based on the Heltec WiFi Lora device and I’ve printed a rather neat little case for it too.

It listens to Bluetooth and WiFi. It doesn’t eavesdrop on anyone, or log data packets, it just counts the number of different device addresses that it sees and then sends the totals over LoRa to an application.

If you want to build it my strong advice is to use Visual Studio Code running under Windows 10 and with the PlatformIO framework installed. I used this and followed the instructions carefully and the program built and deployed without much fuss. I did get one warning about a missing configuration for the LMIC but this doesn’t seem to matter. The device works fine and I’ve even managed to send control commands back into the device over LoRa.

If you want to get a rough idea of passenger traffic at a particular location then I can see it being a very useful device. I’m a bit worried about privacy issues though, in that while it would be very hard to go from the MAC addresses of my devices to actually identify me directly, it would be trivial to detect that the same person has been to a particular place multiple times. This might be considered an encroachment onto privacy.

Whether or not you use the data like this is really down to self-discipline as an individual programmer, but then again they are already doing this kind of thing in shopping centres…

Spotting a smile with Windows IoT

I’ve been working on my demos for the Insider Dev tour. One of the examples shows how to use Azure Cognitive Services to analyse a picture, find faces and see how happy they are. I’d like to use this in my demo, but I want to use the camera rather than a fixed image.

Anyhoo, I’ve got it working. The Raspberry Pi snaps a picture, sends it to the cloud and then gets back the location and happiness of anyone in it. I’m looking forward to showing it off next week.

I don’t intend to point the camera at the audience though……

Deal or Duel Game

I bought Deal or Duel on a whim. It seemed like a good price for a game with lots of moving parts and I liked the idea of setting up a pistol fight between King George III and Napoleon Bonaparte. We’ve had two goes at playing it now, and I must say it is growing on me a bit.

It is fiendishly complicated. And the rules don’t help much. There’s lots of details on some aspects, but others are left delightfully vague. There’s a knack to writing good game instructions and the people behind this game don’t have it. We had quite a few situations where it just wasn’t clear what should happen and we fixed the problem by making something up.

Having said that, it was quite fun to play, and you do get rather attached to the characters in your “roster”. The gameplay is peppered with American Independence facts that are interesting in a pub quiz kind of way and I’d like to have another go at it to try out a strategy that will involve picking fights with everyone.

If you’re prepared to put the time in, you can have fun with this game.

Heltec serial port problems fixed

One of the great things about working with other people is that if you get stuck you can simply hand the problem over to someone else. For ages I’ve been having problems with the serial connection between my Heltec device and the PC failing. I’ve tried all kinds of remedies and even thought one or two might have fixed it, but no. It’s a really frustrating problem because when the connection fails I have to re-boot my PC to make it work again. This rather slows down development.

So, I asked Robin to take a look. He put an oscilloscope on the power supply and looked at what happened when the air quality sensor was turned on. This sensor has a little fan on it and it turns out that this draws quite a bit of current as it begins to rotate. This causes the 5 volt supply to drop to 3 volts for around 50 microseconds, which breaks the USB connection on the Heltec.

Putting a 470uf capacitor across the Heltec power supply fixes this. So we now have fully working serial ports. Yay!