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.

Making device configuration easy with QR codes

One of the hardest parts of installing an IoT device is making the initial configuration. The normal way to do this is to have the device start up a WiFi access point which you connect to. This is OK, but browsing for access points is a pain. However, you can now do this with QR codes. It turns out that there is a QR code that most phones understand that can be used to connect them to a WiFi host.

WiFiAP.jpg

The picture above shows how it works. It was produced at the QiFi web site here. I entered the name of my device (in this case CLB-3042d9) and it has generated a QR code I can scan with my iphone camera.

When the phone sees the code it offers to open up a WiFi connection to the device. It might just work with your phone too, otherwise you’ll have to track down a QR code scanner.

Note that I’ve turned off encryption and I’m not using a password. If you want a more secure connection you can change the Encryption settings.

Once I’ve got a connection to the phone, the next thing I need to do is to browse to the configuration site the devices is hosting, which is usually 192.168.4.1 I use another free web site to make a QR code with this address in it. You can find this site here.

WifIP.jpg

The link in the second QR code sends the browser to the settings page for the Connected Little Box. The user can then enter the settings and then reset the device, at which point it will wake up and start working. You can see my “work in progress” setting page below.

clbsettings.png

I’m going to print a label out with the two QR codes and a few lines of instructions that I can stick to each device to make it really easy for people to set them up.

Adding MQTT security in HackSpace Magazine

hackspacemqtt.jpg

I’ve written an article about MQTT security that has been published in this month’s HackSpace magazine. They’ve done an amazing job of fitting my prose into just two pages. You can download a free copy of the magazine - which also has lots of other great articles - from here. If you want a printed copy you can subscribe and get a free Raspberry Pi Pico microcontroller.

MedHack 2021 on March 6/7

medhackHull.jpg

If I have one piece of solid advice for students it is to do stuff. Not just the coursework - everybody has to do that - but the other things that make you interesting. If you want to form a band, then go for it. If you want to write a book, why not? If band forming and book writing are not for you, the very least you should do is take part in events like the upcoming Med-Hack at Hull.

Events like this let you hone your skills, try out new technologies and work with people. They are invaluable. Med Hack has a workshop track alongside the hacking which you can use to spark ideas. You can sign up here.

Choosing power connectors

connector.png

The two power connectors above look pretty similar. The one of the left looks shinier and fancier, but actually I don’t like it very much. This is because of the way that it is fitted onto the box you’ve made for your device.

You need to push the back of the connector into the box through the hole from the outside. So when you are soldering wires onto it you need to remember this, and also thread the retaining nut onto the wire that you are soldering into place. All of this adds up to make fitting a connector like this much more tricky. My experience has been that I get the first one right, and then get the second and third ones wrong, or vice versa.

The connector on the right fits from the inside of the box so you can solder it up first and then add it to the box afterwards, pushing the front of the connector through a hole and attaching the retaining nut from the outside. Which is much, much easier to do.

When you’re choosing connectors for a project it is well worth considering things like this.

Azure Space Mystery is launched

The Azure Space Mystery launched last week. Its an interactive text driven game in which you have to save the International Space Station from crashing down to earth. You get to push buttons, flip switches and turn handles. And that’s just on the first page. You also get to meet up with inspirational people, all rendered in cool pixel graphics.

I’ve managed to crash a few times, but I’ve enjoyed doing it and learned a bit too. If you have kids the right age you could have a lot of fun battling through the asteroids and other hazards together. You can find it here.

Pasting Edge links as plain text

plaintext.png

I hate it when software gets too clever for its own good. The otherwise wonderful Edge browser (it is the only one installed on my PC) has developed a really annoying behaviour when pasting web links into other programs. What I want to happen when I paste a link is that the link text is pasted into the target. So I can paste:

https://www.robmiles.com

..into everything.

This used to work fine, but after a recent “upgrade” my pasted text started appearing as hyperlinks. This is a clever thing to do, but it is not what I want. If I copy a link, I want to paste a link.

At first I thought it was something that Word was doing, but it turns out to be Edge that is the culprit. Fortunately it is easy to get rid of this “Improvement”. Click the three dots at the top right hand corner of your browser window. select Settings from the menu that appears and then select Share Copy and Paste from the settings menu. Then change the share copy and paste option to Plain text as you see above. Then your urls will be pasted correctly.