Mining for Games

Next thing to do is make a box.

Number One Son is visiting us for Christmas and, as usual, he has brought a few toys for us to play with, starting with a PlayStation 5 APU-based BC-250 crypto mining board. He picked this up for a very good price from AliExpress (although they seem to be getting a bit more expensive now). The board was built for a life in a rack of servers mining crypto coins, but now they are appearing on the second hand market. They need a bit of work to get going, you’ll need to find a power supply, an SSD and a suitable fan, but once you’ve done that you end up with a machine that will run Steam games at a fair old speed. It’s not quite PlayStation 5, more like PlayStation 4.5, but it is very useable and a great way to get into higher performance games or as something powerful to pop under the telly. You can find out more here.

Bug in the C# Yellow Book

Phiko even sent a diagram explaining the mistake

My C# Yellow Book has been out for a while. I still get emails every now and then with corrections to the text. Phiko got in touch last week about an error that nobody else has spotted. At the start of the book we write a program which works out the amount of wood and glass required to create a window. It contains the statements:

glass area = width of window * height of window
wood length = (width of window + height of window) * 2

Phiko explained that this is wrong, because the length of the wood required must include enough to make the corners of the frame. So, to work out the correct length you also need to factor in the width of the wood too. This all goes to show the importance of testing. If I’d actually tried to make a window using the amount of wood calculated by the code, I’d have found the problem immediately. I think Phiko has a great future as a developer. Well done. I’m going to update the example in the next version of the book.

Fun with Banana Camera Images

You’d think I’d look more pleased

Well, I’ve got my camera capture working for the Nano Banana camera. I’m not using the same display as the original, so I’ve had to write the display driver from scratch which has been great fun.

At the moment the captured images look fine (see above) but the lcd viewfinder display is a bit of a mess. But I think I’ve done enough for this evening.

Sticky Keys

Here’s a lifestyle tip for all (both) my readers. Don’t use a key to slice through the tape on a package and then immediately try to use the same key to open the door. Slicing through tape can deposit a bunch of sticky stuff onto the key which then ends up in the lock.

I spotted the gluey residue just in time. No damage was done. Second lifestyle tip is to rub a lead pencil up and down the business end of a key a few times. This deposits a layer of graphite on the key which will find its way into the lock mechanism and make it work much more smoothly. Make sure your pencil is a lead one though, this doesn’t work with crayons.

Mixed Franchises in Flight Simulator 2024

There’s a new experience available in Flight Simulator 2024. The Stranger Things add-in lets you take on missions tied to the TV show. It’s a single player thing, which is a bit sad as I quite fancied three of us all going for a flight in the upside down. However, the experience does come with a really nice Huey helicopter from the show which is great fun to fly. We got together tonight and took it around the Jurassic World plugin landscape which was great fun.

Pro tip: If you get in the Huey and it won’t do anything much the trick is to take off, climb a few feet and then crash as soon as you can. When you get put back in the air you should find that the collective is now properly bound to the throttle which makes it much easier to fly.

Tips for using ChatGPT to create code

I’ve written a few lines of code with ChatGPT now. Here are my tips.

  • Start with the most detail about the problem that you can. I’ve actually found that this is a great way to solve a problem whether you use ChatGPT or not - because it forces you to think hard about what you want it to make.

  • Don’t let ChatGPT add complication. It frequently suggests writing more code (for example processing the output of a method rather than changing what the method does).

  • Show ChatGPT the exact error that you got by pasting it into the conversation.

  • Ask ChatGPT to write your documentation too. If you ask it specifically, it will generate markdown files that you can download straight into your project. This works really well. Explain what kind of documentation you want, and the audience it is for.

  • Make a ChatGPT project and upload the source code into the project once you’ve got it mostly working. Then you can refer back to it directly later. Add documents too, especially ones that ChatGPT has written for you that need to be updated as you add functionality.

  • Try very hard not to let ChatGPT rewrite you entire program. When it does this the names of variables may change (filename will become file or name) and changes that you specifically requested earlier may well be omitted. Instead, ask for a set of step-by-step changes and additions that you can work through with it. This helps you build understanding of what ChatGPT is making for you.

  • Tell ChatGPT which bits you want to make first, and just make those. Then put the partially completed files in the project (see above) for it to work on.

  • If it does something that feels wrong, call it out. Best case you’ll get a good explanation of why it is working that way. Worst case you’ll find it has missed something. Which leads to….

  • Don’t assume that the emphatic way that it explains things means it knows what it’s doing. I’ve caught it making the most amazing howlers and heading off in really strange directions.

  • Don’t get upset when you are debugging code that it has written and it starts referring to the code as yours…..

Apple TV Foundation has suddenly got good

When Apple announced that they were making a TV series based on the Isaac Asimov Foundation books I was very pleased. I was less pleased when I actually watched it though, as it seemed ponderous, very full of itself and not that tied into the books I remembered enjoying. The second season was a bit better, although it still seemed to get bogged down with digressions I could do without. But the third season is a stormer. Fast moving action, a terrifyingly convincing baddie and some nice takes on the third volume of the series make it well worth a look.

Christmas Hardware Meetup

Underneath the picture is a breadboard with a PICO and a very old led plugged into it.

We had a select gathering at the Hardware Meetup tonight, but it was no less fun. There were a few entries into the “Christmas Lights” competition. I think the best lights came from Ian, in the form of the above, which not only involved considerable reindeer research, but also proper operation of a hole punch. Ross had brought a set of led panels from his amazing self-playing piano project and spent a while getting AI to develop a nice range of displays.

Animated coloured raindrops version 1

What you get if the AI doesn’t know exactly how your leds are wired.

Lots of fun, plenty of tech talk and even a chocolate or two. We’ll not be having a Meetup in two weeks on 24th December, what with it being Christmas Eve. Wonderful though meetups are, it is very likely that folks will have better things to do at that time. At least, I really hope they do. The next meetup will be on 7th January in 2026.

Hardware Meetup Wednesday 10th December

We’re having a Hardware Meetup in Hull Makerspace (top floor of Hull Central Library) starting at 5:00pm on Wednesday evening (10th December). You can arrive later if you like, but don’t arrive after 7:00pm because that’s when library shuts and we all go for dinner.

There’s a prize for whoever brings along the best Christmas Lights display. And everyone gets a mince pie and a chocolate. Please note that I’m not just doing this because I’ve found a great long string of neopixels. Oh no.

Printing Slow

..now with the words “half” and “Quarter”

I’ve been printing wordsearch clocks again. As you do. The first few prints were spectacularly unsuccessful, which was a surprise as my Bambu printer is usually super reliable. The problem was that the first layer that is printed is the white letters. These are very thin and I’ve always found that white filament tends to not stick as well as other colours. The result was a couple of very messy prints that I had to abandon. So, I tried slowing things down a bit.

This is the print speed menu in Bambu studio. You can change printing speed by height, so that the first few layers of a print can be printed very slowly giving the filament time to stick to the bed. I just print the first 4mm of the model at the low speed, but because this is one of the more complicated bits it added over an hour to the print time. But it also worked, which is nice. So now I can make white and black and black and white wordsearches.

Cleaning Battery Connections

I don’t know why I’m giving out camera repair tips. After all, the camera I’m mending is still not working properly. I’ve narrowed the problem down to one of the five transistors it contains, or perhaps one of the eight switches. Time will tell.

Anyhoo, if you have anything which contains a hard to access battery connection (perhaps at the bottom of a battery holder) you just Blu-tak a small piece of sandpaper to the end of a battery and then push the battery into the holder and rotate it a bit to clean off the connections. Works a treat (but will not fix any other electrical problems that you might have).

Blu-tak is actually really useful for mending stuff. You can use it to hold things on the bench, stick screws to the end of the screwdriver for tricky to access fixings, and also hold things in place while you assemble them.

Schrodinger's Revenge

Yesterday I was waiting for a battery to arrive so that I could discover whether I had a working camera (yay!) or a broken one (boo!). Of course, just because there are two outcomes doesn’t make them both equally likely, so I should have been prepared for brokenness. Which is what I got. Wah. So it was off with the top and…

It’s probably one of these wires…

A bit of experimentation with a multi-meter left me thinking that no power was getting to the system.

…or more likely this one.

One problem with old cameras is that chemicals leak out of the battery and corrode connections, which is what has happened here. So all I have to do is find the battery terminal and solder this wire back on. Or, replace the wire completely - which is what I ended up doing. So now, with the battery check light showing a happy green, I’d fixed the camera, right?

Wrong. The metering was all broken and the shutter didn’t open and close how it should. Turns out that my camera has succumbed to “The Pad of Death”. This is a thing with Yashica Electro 35 cameras. The shutter mechanism uses a tiny foam pad to transfer movement from one lever to another. But, plastic foam being what it is, after a while it turns to dust. No pad, no movement, broken camera.

There should be a foam pad where that pink yuccky stuff is

I had great fun fixing this. If by “great fun” you mean “nearly went insane rolling up small pads of tape and then trying to fit them into the slot between the two parts”. If it breaks again the camera will end up being a “display piece”. Or going on eBay as “sold for parts”.

Newly fitted pad. I hope the glue holds…

Anyhoo, I prevailed and now the meter is doing an impression of something that might be working. I’ll to some proper testing tomorrow, for now I’m happy that I get longer clicks with darker subjects. To be honest (why on earth to people say that - it’s like saying “I was thinking of telling you a lie, but I’ve changed my mind”) I don’t mind if the camera is not quite right yet. I’ve quite enjoyed fiddling with it - pad of death not withstanding - and I’ve gained a lot of respect for the people who designed and made this marvel of mechanics and early solid state electronics. I’m sure they didn’t expect folks to still be trying to use them 50 years after manufacture. It’s a tribute to them that they still mostly work.

Making Stuff Tech Session

I used the converted polaroid camera to take some audience pictures but the ambient light was too strong, so we got a lot of blur. I also added a red cast which you can just about see.

We had a lot of fun at the Tech Session tonight. Rory did a splendid talk on testing, which put software testing into a properly useful context, and then I talked for 45 minutes on the joy of making stuff and what I’ve been up to lately.

For anyone who wants to know what I was on about, I’ll record a screencast (with all of the demos) later this week. You can find out about upcoming Tech Sessions here.