Reset a PICO into USB boot drive mode from C++

The Raspberry Pi PICO is lovely. But it does have a few quirks. One of them is that if you want to load new firmware into the device you usually have to hold down the BOOTSEL button during power up to force the PICO to boot into a filestore mode where you can download the new code into it. This works OK, but it becomes a pain if you put your PICO into a nice box which covers the BOOTSEL switch. To get round this I’ve added a command to Connected Little Boxes which causes the PICO to reboot into filestore mode. Below is the function that implements the “upgrade” command:

void doFirmwareUpgradeReset(char *commandLine)
{
    alwaysDisplayMessage("Booting into USB drive mode for firmware update...");
    saveSettings();
    delay(2000);
    reset_usb_boot(1, 0);
}

The interesting thing here is the reset_usb_boot(1,0) function call which causes the PICO to boot into filestore mode. I can now make a call of doFirmwareUpgradeReset when I want to do this.

UNO No Mercy is a Horrible Game - I love it

The people behind the Uno game have a neat line in making new, different versions of their core product. A while back I had a go at Uno Flip, which I thought was a nice twist on the game. Uno No Mercy is not a nice twist on the game. It is thoroughly nasty. You can do horrible things to your opponents. But, better yet, those horrible things can rebound with hilarious results. We played it today.

You normally win an Uno game by getting rid of all your cards. But in “No Mercy” this is close to impossible. Instead you have to resort to destroying your opponents by increasing their hand size to more than 25 cards, at which point they are kicked out. When you find that there are “pick up 10” cards, and that card pickups can be passed on and increased from player to player, you get an idea of the kind of mayhem that you can get. In the end I won, thanks to some very helpful advice from the other players. But I want to have another go. Great fun, but you might not finish smiling.

More camera nostalgia

This blog might be turning into an old camera blog. Which is fine by me. Number one son has dug out my old Canon PowerShot G9 which I must have given him a while back.

If you are looking fora neat backdrop, I reckon this will do

This camera went with me to Egypt in 2009 and took a bunch of pictures, including the one above.

Another of my favourite pictures

We don’t have any batteries or a charger for the camera, but those are easy problems to solve. I’m looking forward to seeing how it stacks up against my more modern cameras.

Microsoft Flight Sim 2024 is now very good

Photographing stonehenge

We were all very excited when the new version of Microsoft Flight Sim launched last month. We were a bit less excited when it failed to run on the day of release and even less excited when it still wasn’t working after a few days. But now it has settled down and turned into something really very good. The missions are great. We had a lot of fun trying to land on an oil rig and then taking pictures.

It runs well on the Xbox and really well on a proper PC. Well worth a look if you’ve flown before, and if you haven’t the new career mode, with chatty passengers and a chance to take flying lessons at an airport near your house, is rather splendid.

Fuji FinePix S6500 Revisited

It still looks the part. And it has a ten times Zoom!

My nostalgic camera arrived today. It’s a FnePix S6500. I bought one in the early 2000’s when I was looking for a camera to take on trips. It worked very well, despite chunks of it dissolving when I accidentally got mosquito repellent on it. (I’ve no idea what the repellent did to my skin). I used it to take a bunch of pictures that I really liked, and then sold it (as you do) to fund another camera. I thought no more about it until I was going through my Flickr archives one afternoon and found a whole bunch of beautiful pictures I took when I was in Korea for the Imagine Cup in 2007. A quick ebay search revealed a nice copy, along with case, for twenty quids. So I bought it.

Another reason why I like this camera so much

The camera arrived today and I took it for a walk. It was a bit like going down memory lane.

My standard test shot looking good

It is only a six megapixel sensor (around half the resolution of a standard iPhone photograph). The zoom lens is impressive, but a bit soft when you zoom in and very hard to keep steady, what with there being no image stabilisation. Things get very muddy in poor lighting too. But it works a treat and the pictures look really nice with great colours. Just as I remember.

If you are looking for a camera that will produce more interesting pictures than your phone and look good around your neck, you should take a look. But if you do, remember that it uses funky Fuji memory cards, not standard SD ones. The camera I bought came with one already installed, which was nice. Otherwise you’ll have to track some down. Batteries aren’t a problem though, the camera uses four standard AA sized ones.

Digital Sensor Frog Kissing

Twenty years or so ago, when it was released, the lovely large digital sensor above would have cost around 24 thousand dollars. Now you can pick them up for much, much, less than this. I got one off ebay with the aim of converting one of my film cameras to digital. You have to plug the sensor into your computer using a FireWire cable and the result is not particularly portable, but you do get digital results (albeit low resolution by today’s standards). Back in the day magazine and product photographers used them in their studios to replace film. The aim was to get the fast turnaround of digital and the quality of their familiar large format cameras.

I decided it might be fun to have a go with one, and I’m now in the “kissing frogs” phase of the acquisition. Just like you don’t always get a prince (or princess) when you kiss a frog, you don’t always get what you want when you buy from ebay. Particularly with twenty year old digital film backs using an obsolete connection technology. The trick is to plan for this, treat the whole thing as a journey, and make sure that the seller accepts returns.

The film back above, with its lovely clean sensor and immaculate condition, doesn’t actually work when I plug it in. It’s behaving in a manner best described as “broken”. The documentation and the super-helpful folks at Phase One support lead me to suspect that the computer inside the film back has forgotten its software - a problem that can happen with old devices. The good news is that the supplier will accept returns, and it might even be possible to restore the firmware by sending the device back to Finland for a service (but I don’t know the price yet). I’ve learned a lot about the digital back connection process, FireWire and how the device is used, and I now know one way they can fail. I might need to obtain another frog to kiss, but in the meantime I’m having fun, which is the important thing in all this.

The Book of Making 2025

The Book of Making 2025 is now out. It’s a lovely collection of projects in a huge variety of areas. If you’ve been regularly reading HackSpace magazine you won’t find much new. But if you're new to making and looking for project ideas, or just want to spend some time wondering at what people can make, it is well worth a look and very good value for the amount of content that you get. And I’m not just mentioning it because one of the articles is my camera printing one….

Chasing Memories of Korea 2007

One of my favourite pictures

In 2007 I was lucky enough to get to go to Korea as part of the Microsoft Imagine Cup competition. I took with me my favourite camera of the day and grabbed some snaps I was really pleased with, including the above. You can find all the pictures here. There are a lot of them. I was browsing ebay (as you do) and I happened upon the same camera that I used for these pictures on sale for a mere 20 quids. I’ve bought it. It will be interesting how it compares to the cameras of today.

Coffee Tasting Fun

Tasting in progress

I’m not really a coffee connoisseur. I can work up strong feelings about films and lenses, but not coffee. However, today I took part in a coffee tasting event and it was great fun. It was organised and presented by James Hoffmann from the Decaff Project. Number one son set it up. He ordered the packs of coffee beans which contained “fully caffeinated” beans and three others which had had their caffeine removed by different processes. Then, at 3:00 pm today we sat down and watched a live broadcast of the tasting process, had a go ourselves and filled in our notes. The aim was to determine whether taking caffeine out of coffee also removes all the flavour, and whether the caffeine removal process used makes a difference.

The results were interesting, at least for me. Two things stood out. Firstly, I think that my palette needs a bit of work. I could tell the difference between the samples, but not well enough to be able to reliably identify a particular one. Secondly, I think that decaf coffee is not a second class citizen where flavour is concerned. I would enjoy a decaf blend as much as the “proper coffee”.

It would be nice to think that decaf will end up a “first class citizen” where coffee is concerned, rather than the blend that they add on the end of the list to satisfy those who would prefer to avoid the caffeine hit.

Drink Manager Diagram Maker

If you want to create quick little diagrams like the one above I can strongly recommend PlantUML. Below is the text description that I wrote for the diagram above.

@startuml
title RFID Reader Device Operation

start

:RFID Card ID received;

:Check if Card ID Exists in Internal List;

if (Card Found?) then (Yes)
    :Turn on RED Light;
else (No)
    :Turn on GREEN Light;
    :Add Card ID to Internal List;
endif

stop

@enduml

PlantUML can create all kinds of diagrams. It is free to use online (although the popup adverts are really annoying) but you can also install a local copy.

Get rid of wavy red lines

Note the lack of wavy red lines

I’ve made a tiny change to the Simpleterm page. Simpleterm is a tiny serial communications program that lets you plug a Connected Little Box into your PC or laptop and then configure the box via the serial connection. Normally text display boxes (like the ones used to display output form the connected little box) perform spell checking on their contents. This can be annoying. Lots of the elements in the screenshot above are correct but not properly spelt words and so end up with wavy red lines underneath them.

The fix for this is easy. You just have to add “spellcheck=false” (without the quotes) to the HTML element. I’d much prefer it if spell checking was something you enabled, but we are where we are.

Hardware Meetup Time

I took this picture yesterday

I never seem to have any pictures of the really good meetups. We are all too busy talking about this and that and solving the problems of the world. Today was no exception, greatly enlivened by the arrival of Simon, a splendid fellow with an appreciation of time technology. He and number one son (a budding clock builder) had a great conversation about topics such as escapements and whatnot.

Ross brought along his piano keyboard reading technology which is now in full-blown PCB form and looks really lovely and works well. And we rounded off the evening with some great Italian food from a restaurant I didn’t know existed.

The next Hardware Meetup will be on the 22nd of January 2025. It's going to be a big one, with a musical twist. If you want to know more, ping an email to hardware@robmiles.com and I’ll add you to the mailing list.

A little more agitation...

It was a lovely clear day

Went up town today (lunch at Thieving Harry’s) and I took a few pictures. Then, when we got back I developed the roll. When you develop film it is a good idea to move the film around a bit (although you can also leave it standing for an hour or so). Up until recently I’ve been turning the tank upside down a couple of times for each minute. This works OK, but if the tank top is not entirely watertight you can end up with hands full of developer.

So lately I’ve tried using the little “spinny thing” that came with the tank and lets you rotate the spiral containing the film. This is easier to do and keeps your hands dry. It also doesn’t agitate the film as well. If you look at the picture above you will see streaky marks in the sky which I think are caused by insufficient agitation. It looks like I’m going to have to go back to “wet hands” process. But I think I’ll get some gloves too.