Wednesday, April 25, 2018

Casing the Raspberry Pi

Sound of Music: Favourite Things

The Raspberry Pi IMHO makes the ultimate 2018 Home Automation Glue Computer, Educational Tool and so much more.

But once you have finished prototyping, your Pi needs casing.

The case will help protect it from the elements and protect people who think a 5V 1 ampere powered computer can electrocute them  (it can't).

Marcus and Agata have settled on 2 cases.

Closed Case: FLIRC

So this is going to cost you a huge 15 GBP but since all cases start from 6GBP I think of it as a 9GBP tax for something robust and beautiful

Yes it is really metal.  There is a sticky pad you attach to mate with the CPU to transfer heat into the case

First time installation required a bit of jiggling.   My second case installation took seconds.    Single set of screws puts on the ventilated bottom case and holds the Pi securely inside at the same time

Oh and the Micro SD card is easily accessible to slide in and out, unlike with many other cases.

Finally the FLIRC case fully supports the Pi 3B+, and at the time of writing in April 2018 you are unlikely to be buying anything else.

Open Case

The PiBow 3 Coupe is the case we chose where you need a Pi 3 B+ and access to the GPIO pins.  It is just under 9 GBP

 Fun self assembly of <5 minutes is required.

Your Own Case
Owners of 3D Printers can really get smug, for they can print a Raspberry Pi 3 case without issue.  If you know a friend with this technology then please contact them immediately.

Pi Zero?

Initially it might seem attractive to use the 10 GBP Pi Zero W computer.   But remember this is a single core 1GHz 32bit CPU vs a 1.4 GHz Quad core ARM CPU (albeit run in 32 bit mode).

For any future project we think to standardise on a Pi 3B +.   When you consider the delta between the zero and 3B+ including case and memory card, to Marcus the 3B+ seems like a small increment for a much more powerful computer.

However, if you really think that this computer will be powerful enough to perform the task you want, then I'd recommend the official case.    Here is a portable camera that we built earlier

The duct tape attaches the Zero W to a powerful Powerbank which also has a solar panel and bright LED light to light up any night-time scene.

Family Shot

Some Pi we built earlier.  The Pi 3B+ in FLIRC case, with fast 32GB Memory Card  and powered from a Masterplug  comes in at about 60GBP.  Simply astonishing.

Tuesday, April 24, 2018

Marcus runs the London Nohtaram

Subtitle: Determination, Pain and Smiles

Unlike Agata, Marcus did not qualify in the good for age category for the 2018 London Marathon.   But on Sunday April 22 2018 I did in fact run 

just over 44 Km,  and this was before my unexpected run to rescue Agata who collapsed en route later that day as described here

The nohtaram is as the word suggests a marathon but backwards.  

It is an unofficial event held immediately before a real Marathon.  Competitors meet at a point close to the finish and set off backwards to the marathon start.   The timing should be that you arrive to the start well before the real start so as not to annoy/ alarm/ piss off any race organisers.

The brilliant bit is that hours before the race, streets may be isolated off, at least in some sections, so you can safely run on the road route of the marathon itself.

So at 01.45 Marcus arrived to the iMechE headquarters at Birdcage Walk in full running gear.

Actually not so simple.  So this 42.1+ Km run needs to be self supported.   You have therefore to carry all the food and liquid supplies you will need to run the whole distance un-aided.

I was wearing my best Ultimate Direction Ultramarathon  adventure vest  chocked full of food and drink.  I figured in the worst case that fellow competitors might not bring enough provisions so it would be prudent to carry a little extra

Distaster Strikes Early
My hotel was 1.6 Km from the nohtaram start.   I got out of the hotel, locked my personals into the car, all good so far.

I began to run.

Immediately I felt a sharp, severe and unwavering pain in my left leg.   It was saying to me:   stop now, don't run, really don't even walk quickly,  you are injured.

So 3 days earlier I strained my groin / and/or started getting 

Sciatica like pains down my left leg.  I left it alone for that time and had not thought to check the leg at all with a test run since.   Now with all my kit on,  the signs were awful

Keeping Quiet
The nohtaram is an unofficial event.   I would be meeting a group of runners for the first time and the last thing people want is some old bloke winging on about how every step he takes is agony, and perhaps would everybody mind slowing down a bit or taking things easy.

So I thought not to mention it.   We set of at 02.00 and the plan was to reach the end of our run, i.e. Marathon start, or as close to as possible to not annoy security, before 08.00.   Plenty of time right?

Literally every step was bloody agony but I thought if I can get to 10K without fainting or screaming then well it might be possible.   The initial pace was quicker than I would like but I managed it.

After about 10Km we split into 2 groups and at about Km 15Km   some people finished  (intentionally) whilst others broke away.

Marcus got talking to 2 really great runners,  Maggie and Gavin.  It turns out they would really save the day for me .....

Slow Down
The three of us agreed to dial down the pace just a little and take things easy.  This way  I'd have some chance of finishing I thought and we might have some smiles and interesting talks along the way.

Dumb and Number
As I continued to run,  the pain in my left leg, to be specific a line from behind my knee upto a point at the top of the leg just got stronger and stronger.   My body started to react by anaesthetising me from the pain.   It turned the leg numb.   I could not really feel the leg properly and had to keep looking down as a visual check that the leg was actually pointing ahead and not for example wildly out leftwards.

I head plenty of time to consider what my left leg condition would be in 24 hours after the endeavour finished

Still Going

Somehow I made it into Canary Wharf and round and out.    We were past the 20Km mark and I was still running.

When you run in continuous pain you have plenty of time to contemplate pain levels, and how in a relativist way this was surely better than, say breaking your leg, or being dragged down the street by a car.

But what mainly kept me going was a very nice conversation with Gavin and Maggie.  None of us knew each other before this race but now we talked in detail about Trail Running

No Music Really

Anybody who knows Marcus realises that I am rarely separated from Music.  Indeed that night I had a playlist organised, and my Race legal Trekz Air headphones on.  But you know, the conversation, and the sights and sounds  were that good, well for once, I just shut down the music and kept running without.

The East End
I used to live in the East End on West Ferry Road, London .  It was a decade plus part of my life that I will never forget.  Some happy, sad and violent times.   And this night the chance to run past my old Flat, seeing those familiar shops and streets and the memories came flooding back.

I hope some of the more interesting anecdotes that I related to Gavin and Maggie were appreciated.  I did not see any signs of that's too tall a tale, or I just can't believe that.    Well all the stories were true,   the Flour Tower,   David Owen's residence,  the early days of Canary Wharf and pre DLR, and industrial action at Wapping.   Yes, those were definitely the days

Km 30+
After Km 30 we slowed down further and had time for a Coca Cola stop and a visit to one or more toilets, and some various photo opportunities as light rose.

At this moderate pace we all exchanged further running tales and experiences.  As trail runners there was discussion of some 'decent ultras' past, present and future.  And not these trivial marathon distance courses that we had put ourselves into like this one :-)

We finished!
Yes, at about 7ish we finished.  I had dragged my feet making unprofessional scuffing sounds for the last few Km, but hey,  I kept going.    A few minutes later I was doubled up being rather sick on the pavement,  a combination of elation, relief, a troubled tummy and pain in a now very poorly left leg.

Salmon Runners

So the time was now just past 8am and I arrived back to Victoria in the presence of some other nothtaram atheletes whom I had not seen since 02.00.    At Victoria  I felt like a Salmon as an avalanche of Marathon competitors came towards us on a train to their Marathon start and what was our nohtaram finish.

Thanks one last time to Maggie and Gavin for making my run interesting, and I hope I did not blab too much along the way.  The UK ultra trail running community is I feel quite compact so future contact is likely.

Monday, April 23, 2018

Agata Down

Marcus got a phone call from St Johns Ambulance this Sunday April 22nd to say that Agata had collapsed at KM 38 of the London Marathon.

I did explain that as she is an experienced Marathon Runner,  meaning over 8 marathons for sure,  and really countless Ultras, I hoped it was nothing serious, and would she be back on her feet to continue soon?

They replied:  But she can't stand up

I replied:  I am coming immediately :-(

Finding Agata
Not a subject for today, just to say that this Sunday I was barely able to walk.  However it is surprising how Adrenalin kicks in when your partner appears to be in serious trouble.

I set the GPS for Angel Street, the name given by the St Johns medic on the phone, and began to run.  Well, hobbling at first, but despite some intense pains I kept going.  On Marathon Sunday,  in London  it is difficult to convey how crowded the streets were.   

I'll just say that running on the pavements was truly a frustrating obstacle course.

When I was about 500 metres from Angel Street it became apparent that they (St Johns Ambulance) had given me the wrong address.  It was not on but just near the marathon route.

So, I had to find what was the closest Point of the over 20 St Johns, on the course where she was likely to be.  Sadly Agata did not eventually take any phone so Google GPS location could not be used.   Now I was not just unhappy but getting concerned.

The first St Johns I arrived at did not have Agata, and since she could not stand she could definitely not have run away.  I then found out that they don't report back to their control centre who is helped or kept where.  And they refused to ask the Control centre to ping other St John Points at around KM 38 where  Agata was thought to be positioned     (The tracking chip in the foot triggers every 5 Km so she could have been between KM 35 and KM40 in the worst case.

Based on the Ambulance Stations on a map,  I decided with staff it was probable that  she was 1 or 2 stations West  (towards the finish) or there was a slim chance she was a station East of current.    Since I had painfully run East from the finish to this Eastern point anyway  I thought it was prudent to continue further East first, then double back.

There is no record of the amount of relief I felt when I saw my darling wife.

This relief was somewhat short lived as she was totally disorientated and could not speak coherently, and standing up was for now out of the question.

A lot of form filling ensued, with the usual seek GP medical assistance if symptoms persist disclaimer.

As Agata recovered another runner came in on a stretcher.  In really a much much worse condition.

This put Agata's position in a reference I suppose.

Eventually Agata's blood pressure and heart rate stabilised, now it turns out our long, really long journey to the finish line began:

Cleaning Up

Agata had the vision to drop a bag of clothes at the start which is transported to the finish.   But these bags are accessed (we eventually found out) by crossing the finish line then continuing forward walking to the lorries with bags

First we had to get to the finish, difficult as the tube stations, were absolutely chock'd full of people.   Every step was difficult and traumatic for both of us, but there was no legitimate way to get Agata's bag.

Eventually we strutted back through the Exit, like a salmon against hundred of people walking towards us, and made the bag lorry.  Picked up Bag.  Relief!

Going Home
Bag in hand we now had to get to our car and rented Apartment which was several Km away and not walkable in our current state.  This took us an age, and eventually we were forced to walk the last bit.   There then followed a long Marcus driving activity.  Anything else would have been reckless and stupid.  Agata was not in any state to be behind the wheel.

Learning Points
We have done countless Marathons and Ultra Marathons in conditions far hotter than the 25 degrees Centigrade of London today.

Our complacency was that this was 'merely a Marathon' which is quite short for our normal race standards.   Turns out though, in these conditions, and on this day it proved a real killer.

Agata is now back home and smiling,  and so therefore am I.  I think the good news is that this woe has re-enforced the feeling or sheer dread that we have when our other half is known to be in a bad way.   We choose to care deeply about each other, at all times and for each and every day.   Long may this continue.

Sunday, April 22, 2018

Prodigio, Bluetooth and Stupid

This is not a review of the Nestle Nespresso Prodigio, merely a critique.

Let me first say that I'm a big fan of the Nespresso system when used with prudence.   Nespresso, the coffee system is a small Aluminium capsule filled with different coffees according to your taste that you insert into a machine such as above.

The capsule is punctured and boiling water forced thru the capsule to make your coffee.   Then either a solenoid or a manual handle action ejects the capsule. In less than 45 seconds from cold (on modern machines) a wonderful coffee is made, consistently every time, without mess.

Nespresso Vertuo
Neslte recently introduced an alternate range called Vertuo, first in the US, now worldwide.  It uses a different non aluminium capsule in different sizes allowing for much large coffee delivery and simpler recycling of the spent capsules.   Every Nespresso vendor I've ever spoken to insists that Vertuo is not a successor to the classic capsule format, but we will see of course.

Back to Prodigio 
We first checked this out in Switzerland almost 2 years ago.  But this week we were offered a machine practically at no cost.  So we decided to review it to see if it can supplant our current Nespresso U Milk

Via a Bluetooth connection to your Internet Connected Smartphone and Nespresso App this was supposed to provide some additional useful features.

Let's start with the common features of the latest gen regular machines:
- Very Fast Starting
From cold it's ready to start dispensing in 25 seconds.   This is about the time it takes you to insert a capsule and find a cup.  Absolutely astonishing.

- Solenoid Operation
After putting the capsule in and closing a hatch, a solenoid clamps and punctures the capsule.   The older method, and still used on most cheaper machines is: a large handle that you turn to move whilst slides and pierces the capsule, and then you manually  eject it after coffee brewing.

With a solenoid you can take your coffee and then the solenoid unlocks and dumps the capsule as you walk away.

Save vital seconds and is much slicker.  No really.

- Auto Coffee dispense
This means you can power on the machine, press the appropriate size dispense button, then when the machine heats up (25 seconds) the coffee brewing automatically starts.

You don't therefore have to wait for the machine to come to temp and press buttons.  Again, this innovation makes for a slicker experience

Prodigio Specific
To the above list the Prodigio adds:

- 01 Capsule Management
If you use the app to order capsules then the machine figures out what it is dispensing.   So then it knows what your remaining coffee levels are and can alert you to order more.

But what about capsules not ordered in the app, (say in a Boutique)  or if you damage one, etc.  

Flawed feature :-(

- 02 Cleaning notification
After certain hours of operation the connected Smartphone application can ask you to clean the machine.

Useless feature.  This is something most respecting owners take care to do for themselves. :-(

- 03 Schedule a brewing
You can tell it to make a coffee on a schedule. But, you need to have previously inserted a capsule and a cup.  And we have already established it takes only 25 seconds to warm up.

Quite the most idiotic feature for a coffee machine ever :-(

Bonkers Bonkers
To summarise, it is as though they took a decent machine and added 3 features, which are between dubious to zero value.   They don't add to the user experience and are simply there perhaps to claim that a connected machine exists.

A big thumbs down!

Saturday, April 21, 2018

Agata converts from Apple to Android

Sing Hallelujah

Subtitle: A bitter sweet ending

My development / party / other phone is a shiny Nexus 5X rocking Android 8 Oreo.

Imagine my surprise when my wonderful wife expressed an interest in using it for a forthcoming Marathon.  Now since the phone has an unlocked Bootloader,  a custom TWRP recovery image and is fully rooted I thought this was too powerful a combination to hand to this hardcore Apple User.

She could accidentally trash the whole phone.  So here is how I put the phone back to stock

Unrooting my Android Phone

01 Download the Correct Package from Google

I download loaded the bullhead Nexus 5X package from here

02 Install ADB Toolkit and test with fastboot

Download to your PC the drivers that will allow you to talk to the Android phone bootloader.   Many sources available.  Try clockwork mod first

After installation connect your phone to the PC and copy all the package files i.e. the 2 .img and 1 .zip files to the same directory where fastboot.exe is located.

03 Boot phone into Bootloader
For the Nexus 5X power off the phone, then power on pressing power ON and downward arrow button together

04 Check Fastboot

Get the fastboot devices command to return the id of your phone.   If fastboot shows a blank then first try a different cable, else next you will have to try a different ADB installation.  Painful but you can't get anywhere until fastboot devices returns something

05 Replace Bootloader

 fastboot flash bootloader bootloader-bullhead-bhz31b.img

Replace any custom bootloader with official file

06 Reboot to Bootloader

fastboot reboot-bootloader

07 Replace Radio

fastboot flash radio radio-bullhead-m8994f-

Replace the radio i.e. code that talks to your SIMcard providing telephony

08 Reboot to Bootloader

 fastboot reboot-bootloader

09 Replace the Operating System et Al

fastboot -w update

The output was thus:

extracting android-info.txt (0 MB)...
extracting boot.img (11 MB)...
target reported max download size of 536870912 bytes
archive does not contain 'boot.sig'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
extracting recovery.img (17 MB)...
archive does not contain 'recovery.sig'
extracting system.img (1909 MB)...
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
extracting vendor.img (185 MB)...
archive does not contain 'vendor.sig'
wiping userdata...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
Creating filesystem with parameters:
    Size: 27283927040
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8176
    Inode size: 256
    Journal blocks: 32768
    Blocks: 6661115
    Block groups: 204
    Reserved block group size: 1024
Created filesystem with 11/1667904 inodes and 148720/6661115 blocks
wiping cache...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
Creating filesystem with parameters:
    Size: 100663296
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 6144
    Inode size: 256
    Journal blocks: 1024
    Blocks: 24576
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/6144 inodes and 1422/24576 blocks
Bootloader Version...: BHZ31b
Baseband Version.....: M8994F-
Serial Number........: 01e1949a26c04e96
checking product...
OKAY [  0.020s]
checking version-bootloader...
OKAY [  0.015s]
checking version-baseband...
OKAY [  0.018s]
sending 'boot' (11789 KB)...
OKAY [  0.349s]
writing 'boot'...
OKAY [  0.111s]
sending 'recovery' (17433 KB)...
OKAY [  0.460s]
writing 'recovery'...
OKAY [  0.218s]
erasing 'system'...
OKAY [  0.487s]
sending sparse 'system' 1/4 (511320 KB)...
OKAY [ 13.218s]
writing 'system' 1/4...
OKAY [  5.874s]
sending sparse 'system' 2/4 (524130 KB)...
OKAY [ 13.398s]
writing 'system' 2/4...
OKAY [  5.734s]
sending sparse 'system' 3/4 (500189 KB)...
OKAY [ 13.019s]
writing 'system' 3/4...
OKAY [  6.165s]
sending sparse 'system' 4/4 (419689 KB)...
OKAY [ 10.760s]
writing 'system' 4/4...
OKAY [  4.321s]
erasing 'vendor'...
OKAY [  0.108s]
sending 'vendor' (190308 KB)...
OKAY [  4.354s]
writing 'vendor'...
OKAY [  2.552s]
erasing 'userdata'...
OKAY [  2.947s]
sending 'userdata' (138993 KB)...
OKAY [  3.188s]
writing 'userdata'...
OKAY [  1.343s]
erasing 'cache'...
OKAY [  0.075s]
sending 'cache' (5688 KB)...
OKAY [  0.211s]
writing 'cache'...
OKAY [  0.083s]

finished. total time: 89.252s

10 Reboot to Bootloader

 fastboot reboot-bootloader

11 Lock Bootloader

fastboot oem lock

12 Give the phone to Agata for her customisation

Initially I had trouble connecting my PC to the Nexis 5X.  fastboot refused to work.  I had to move to an alternate Windows PC and use a different ADB installation.

Once fastboot worked the process will take you literally minutes from start to finish.

Then on the final reboot you will have a factory fresh phone without any extra applications or data for you to customise.

And Just one More Thing

After all this effort there was a kicker to the end of the story.  Agata has now confessed that she does not want to take her precious Apple iPhone on the marathon.  The implication is that instead she would like to take my lesser Android phone instead.

I mean the barefaced cheek of it :-)

I can only hope that when see seas the beautiful seamless and superior Android experience she will at last begin to consider jumping out of that Apple walled garden.  It's so much better outside. It's just not Double Dutch.   

This is Double Dutch: