The Pie Face Canon

canon.png

As part of my Red Nose Day presentation I’m making a remote controlled “pie face canon”. The pie flinging mechanism is a canon from a pie face game that you load up with whipped cream and then fire. I want to people to be able to control it from the internets and maybe even hit me in the face with it. No idea why. Perhaps it is the technical challenge.

And technical challenge it is. The biggest problem is that when the mechanism is cocked the back tension from the spring loaded piston is considerable, so you have to pull quite hard on the trigger to fire it. And Lego Technic is not very good at pulling hard on things. What happens instead is that the mechanism comes apart. Which is fun to watch but ultimately not that useful.

In typical idiot fashion I solved all the easy problems first. I can move the canon up and down and left and right by remote control. But I can’t fire it yet. A proper engineer (which might be me next time - who knows?) would have solved the mission critical part first and then added the gold plating later. At the moment it works sometimes..

Driven mad by pixels

mad maths.png

There’s a scene you see in lots of movies where the camera pans across a selection of crazy drawings and formulae, to imply the emerging madness of some deranged character or other. I feel that I’ve just lived through that. I’ve been trying to make my pixels move over surfaces in my Connected Little Boxes. I don’t want them to “snap” from one pixel to another, I want adjacent pixels to fade up and fade down to give the impression of the light moving. I want it to work in both “1D” (a line of lights) and “2D” (a grid). I’m sure there are off the shelf solutions for this but I want to roll my own. I’ve finally finished it. It was one of those occasions where actually knowing some trigonometry was really useful.

In praise of wired keyboards

keyboardFinal.png

I’ve been buying keyboards again. My latest one has two things I really like. Twenty pounds off and a wire. I think some things really need a wire and keyboards are one of the. I’ve used a Bluetooth one for a while on the desktop and it works mostly fine. Except that when you first try to use it your keypresses get ignored as it sets up the connection, and all the indicators are barely visible because of battery worries.

This one is a Microsoft Ergnomic design which seems pretty much perfect. It even comes with a great riser which means that i can rest my elbows on the chair arms, my wrists on the padded keyboard front deck and then just let my fingers do the moving around.

It has all the keys in the right places. The left hand shift key is a bit small (only normal key sized) and there is a rather pointless Microsoft Office key at the bottom taking up space that I’m sure could be better used. But all the function keys are full size and the extra keys along the top are mostly useful. And the action is very pleasing to type on.

At the moment the price is very attractive I reckon. One of the smartest things I did around twenty five years ago was to get into ergnomic keyboards. I think that if I hadn’t I’d not be typing as freely as I am today.

What makes a professional developer?

professional Developer.png

One of the things I used to get asked by students years ago was “What makes a professional developer?". I thought I’d have a go at answering the question:

It turns out that the difference between an “amateur” and a “professional” developer is that the professional developer gets paid for their work. You become a professional developer just by selling something that you’ve made. A successful professional developer is one who creates happy customers. Consider this application:

connectToWiFi(ssid, password);
connectToMQTT(host, username, password);
while(true) {
    float x = fetchReading();
    sendToMQTT(x);
    delay(10000);
}

This is code for a data logger. It connects to the Wi-Fi and an MQTT broker and then reads and sends data values every 10 seconds. It works (which is the nicest thing you can say about a program).

The problems appear when you consider questions like “What would happen if the Wi-Fi connection fails?”. In the code above the sendToMQTT function would get stuck and the device would need to be turned off and on to get it to work again.

You might be happy to live with this, but your customer might not. Your customer would be even more upset if they only found this out after they have lost thousands of data readings because their network failed for a few seconds.

A “professional” developer would have to do one of two things: make sure that the customer knows about this “product feature” beforehand, or make the device deal with network failures.

“Going pro” means that you will have to spend more time looking for things to worry about before your customer does, but it will also lead to an improvement in everything you make.

Judging at MedHack 2021

medhackJudge.png

I had a great time today helping with the judging of the MedHack Hull event. Over the weekend teams had been working away on their ideas (although it wasn’t all work and no play, they found time for some Pictionary and Among Us. Over lunch I got to chat with them about their entries.

It was great. I took away a number of things from the event. First you can totally do these things online very successfully. The organisation was top notch and the teams all used Discord to talk to each other and the judges. All I had to do was enter the chat group, fire up my webcam, admit I knew nothing and then wait to be told all about their idea. Then I popped some writeup into a shared spreadsheet and moved on to the next team.

All the teams were wonderful. There was a huge range of different ideas all centred around the medical theme. I’ve watched a lot of presentations over the years and one thing that struck me today was how we have moved on in the quality of presentation skills (or perhaps this was just a very good bunch). Either way, It was great fun. I told as many teams as I could that they should make participation in these events “pay for themselves” by making sure that they form part of the “brand” that they should be building as they go through life.

Kudos to the folks at Hull for organising the event. I hope that they run it again next year.

Talking Connected Little Boxes at MedHack 2021

CLB session.png

Today I did my session about Connect Little Boxes for MedHack 2021. It seemed to go OK. By that I mean that most of it worked (although I did have one jaw dropping moment where I shared a screen that showed an image of the screen being shared, which led to a very impressive “Hall of Mirrors” effect.

Thanks for being a great audience folks. If you are not sure what Connected Little Boxes are and why you want one (or two) you can find our more at my Lecture in Rhyme on Friday 19th of March. Keep an eye out for more announcements coming soon.

It would be lovely to see you at our next Hardware Meetup

In the “Good Old Days” (which are getting progressively gooder and older) we used to have a Hardware Meetup in person at c4di twice a month. We’ get together in the same room and talk about hardware and software and anything else we found interesting. Sometimes we even got within 2 meters of each other.

Happy days.

However, the good news is that the meetings are still going on. A few stalwarts are still meeting up twice a month, although now we do it online. We had a great meetup last night as it turns out. We talked about a whole bunch of stuff, what we are doing, what works, what doesn’t. SBL showed off fantastic progress on the Connected Humber Sensors site. It is now much snappier to load sensor readings.

If you want to come along to our meetups you can find details our our meetups on Mattermost here.

Battle Tags - a 3D print and play game for Red Nose Day 2021

A multi-coloured set of Battle Tags

A multi-coloured set of Battle Tags

If you want to use your 3D printer to have fun, make nice things and earn cash for a fantastic charity then you’ve come to the right place. You can print yourself a set of Battle Tags from my “Tags of Fun” designs and then challenge other tagsters (as I’m calling them) to a game of skill and bluffing. You can find all the files for the game here.

Click the image to get a PDF of the rules

Click the image to get a PDF of the rules

If you like the game you can donate some money here. If you hate the game you can donate twice as much money here because you’ve just hurt my feelings.

Visual Studio Code on Raspberry Pi is awesome

Visual Studio Code Raspberry Pi.png

I’ve been using Visual Studio Code remote development on my Raspberry Pi devices for a while, but what I’d really like to do is just run Visual Studio Code on the Raspberry Pi itself. And now I can.

sudo apt update 
sudo apt install code -y

All I had to do was open up a command prompt and type the two commands above. And then I had an extra option for programming and using all the lovely Visual Studio Code plugins.

This is wonderful, wonderful, news. I’ve installed the Platform IO plugin and I now have a completely self-contained system for development on the Pi. I’m using the Pi 400 device which has a fair amount of processing power. It’s not as fast as my desktop - but then it cost a tiny fraction of the price. And it does get there in the end. Such good news.

Turning off "Sleeping Tabs" in Microsoft Edge

sleeping tabs.png

I’m spending quite a bit of my time figuring out how to turn off new features in the Edge browser. The latest feature I want to give the “heave-ho” to is “sleeping tabs”. These are a great idea if you are a road warrior living off your laptop far from home and miles away from the nearest power outlet. Not that there are very many of these out there at the moment.

Sleeping tabs stop active scripts in webpages from flattening your battery. Lots of web pages are very busy even when you aren’t looking at them and all this activity means more current consumption. The latest version of Edge “freezes” inactive pages after a while. When you go back to the page it is woken up and you can use it again. Unfortunately this can cause problems for some sites. The OctoPrint 3D printer manager doesn’t seem to like being woken up. It’s amusing to watch the print progress bar frantically trying to catch up with the current print time, but this does mean that finding out how much print time is left takes longer than it should.

You can find the option to turn off sleeping tabs in the browser settings. If you are running from a laptop and you want to save as much power as possible you can specify sites that are to stay awake and let the rest sleep on. Me, I’m running on a desktop so I just let everything keep going.

Raspberry Pi Pico cases at AdaFruit

picocase1.png

It has been really nice to see how the folks at AdaFruit have got behind the Raspberry Pi Pico device. They’ve just released a set of 3D printable designs that you can use to make cases , some of which fit onto Lego parts.

picocase2.png

This is the flip side of the fitting. It looks a bit of a mess because it was all printed on top of support material. However, it does work. The circles get a good grip on the pins. You can find these, and the other designs, on the AdaFruit site here.

Another superhero science book is coming..

You know that scene in the movie, the one where the leader starts assembling the team for another battle for the survival of humanity or whatever. Well, it’s happening again. I’ve just had the call from Mark Lorch who’s getting the Science of Superheroes gang back together to write another book.

This time we are going to be taking on the task of writing about the science of super villains. I made the point to Mark that I reckon most of the evil uses of computers have already been discovered and used in real life, but I’m still game to have a go.

Incidentally (book plug alert) you can still get hold of the first publication here. You’ll find me right at the back, I wrote the final chapter, hopefully on the basis that the editors thought you should always leave them wanting more…..

Making QR Codes in Edge

Further to my QR Code fun and games recently I’ve just discovered that you can get the Edge browser to generate QR codes for web sites. I think this feature is also available in Chrome because that is what Edge is now based on. This can be a neat way of sharing a complicated link. Rather than try to copy and paste it you can just take a picture. You need to enable it, as at the moment it is an experimental feature. Start by going to the address in Edge:

edge://flags/#sharing-qr-code-generator

QRCode 1.png

Change the setting to Enabled, as you can see above. Now you can right click on a page that you want to share as a QR code and pick Create QR code for this page.

QRCode 2.png
QRCode 3.png

The QR code is created as an image you can photograph or download. I rather like the distinctive dot format, quite stylish.

Playing Cosmic Frog

Derek and Maggy about to do something devious with their green frog..

Derek and Maggy about to do something devious with their green frog..

So tonight we had our weekly games night. We played that game where you control a two mile high frog that can eat the landscape and regurgitate it. You know the one.

Or perhaps you don’t. Cosmic Frog is a game of strategy and combat that, once you get your head around the mechanism, works well. You use your frog to collect lumps of land which you then arrange in configurations that will earn you points at the end of the game. Other frogs are of course doing the same thing, and might also also decide to challenge you to a battle where you might get knocked off the board for a while and be forced to watch other players pick over your carefully curated terrain.

There are lots of special powers that you can pick up and use if you remember to reveal that you have them. And over time the landscape reduces and the game can come to quite sudden end.

The turn order is random which adds a bit of tension at the expense of you not being able to plan too much because you never know when you’ll be able to make the moves.

To me the measure of a good game is one I want to have another try at because I want to see if I can play it better next time. Cosmic Frog just about passes this test. It’s available for free on TableTop Simulator and I reckon it is worth a go if you are looking for new experiences for your game nights.