Heltec Cube Wrestling

A while back I ordered a Heltec Cube Cell device. It’s a very low Arduino compatible device with LoRa built in. I thought it might make a fine platform for an environmental sensor.

Today I got around to having a play with it. The LoRa support is built in to the device, which means no need for any LMIC libraries (which I use with the Semtech devices). In theory you can send AT commands to the device to configure LoRa and set things up. I say “in theory” because I couldn’t get it to work.

However, it turns out that you can also configure LoRa by using a file called commissioning.h which is deep in the innards of the CubeCell hardware libraries. By modifying this and using a rather useful howto I found here I got the device happily sending messages to the Things Network. Tomorrow I’m going to investigate low power mode.

Robot Tracking at the Hardware Meetup

Tonight we did some robot tracking at the hardware meetup. This is all part of the “Robot Rugby” thing we are working on. Brian and I set up our cameras and got to work. Brian is reading QR codes from the top of the robot, I’m trying to find out if I can get position and orientation from two lit pixels on top of the robot.

We set up the supports (with copious duct tape) and started playing. Tests seem to indicate that I should be able to detect only the pixels on the robot by turning down the gain on the camera so that only very bright lights show up. Lots of work to do here, but we are making progress.

Environmental Sensor Filters

For a while I’ve been looking for air filters that we can use in sensors. The filters must have holes large enough to let air through, but not so big as to allow creepy-crawlies in. We’ve already had one sensor disabled by eggs laid by a tiny spider. For a while it looked as if water inlet filters for washing machines would do the job, but now I’ve found something even better.

These filters are actually for use by pipe smokers but I reckon that they will work a treat in our sensors too.

Buying overhead camera supports

As part of our Hull Pixelbot Rugby effort we need some supports for the camera that we will use to track the robot player positions. Searching for “camera supports” doesn’t work. But after a bit of bouncing around Amazon I came across the above. It’s supposed to be used by photographers to support backdrop cloths, but it provides exactly what we want, a portable means of hanging a small camera over a playfield. The price is very nice too. And I might even use it for photography.

Potato Clock

First thing yesterday morning number one wife told me that she was going to get a potato clock. This threw me completely. I remembered from years ago a demonstration which showed you can power a clock from a potato (you can buy kits) but I didn’t think that science experiments were on the agenda in any particular way.

Then the fog cleared. What I should have heard was “get up at eight o’clock”. Fair enough.

Project XCloud looks very good

When David came round last week he showed us some Xbox games running on his Samsung phone. Not directly of course, but via Project XCloud. This is presently in Preview and David had managed to join the preview program. Once he had connected to our WiFi and paired an Xbox controller with his phone we were able to see a perfect rendition of Forza Horizons running smoothly on his tiny device. It just worked. I had a quick go at driving and it seemed as responsive as the local version.

Of course we are quite lucky in Hull, what with our high performance fibre internet everywhere, but hopefully it will work as well in less well connected regions. It looked very good. It even inspired me to spend some more time in the Forza universe, which was great fun as usual. There’s nothing like going sideways down a frosty road at great speed in a top of the line BMW. I sat down for “a quick drive” and got up two hours later…..

Hull Pixelbot tracking for robot rugby

At the last hardware meetup we decided that it was time to get our robots playing rugby. The idea is that it is a team game, with members programming their robots to make plays in a playfield. .

We’ve no idea how it the game will actually be played but we have decided to find out by just doing it. Brian has done some sterling work (see above) with an image processing application that can now identify the top of the robot (see the bit in the green circle above. The next thing to do is to pick out the QR code and identify the robot. Then we send this position back to the robot to tell it where it is. This will make it possible to write programs that will make the robot head for different parts of the playfield.

We will be setting up our robot arena and doing some tracking experiments on Thursday next week (the 5th of December). If you want to come along and play your part in designing the game and how it works we’d love to see you. We start at 6:00 in the group work area in c4di.

Old game boys never die

There must be about twenty quid’s worth of stuff here….

A couple of weeks ago we went to Comic Con in Birmingham. As I remarked at the time, | didn’t buy much. One of the reasons was that I already had lots of things for sale on some of the stalls. Today I happened across a bag full of bits and bobs, including my beloved Game boy Color and printer. Amazingly it still had some of the pictures in the camera memory. The printer still works too, although the thermal paper seems to have given up the ghost. I wonder if you can still get paper for it?

Knives Out is a great film

Knives Out is great film. It’s a country house murder mystery in the Agatha Christie tradition but brought up to date.

I’m not going to give anything away. All I can say is that the ending was surprising and very satisfying. And that I got it all completely wrong.

There are some “laugh out loud” moments to be had too. Impeccably acted (which is what you would expect with a cast like this) and very well put together.

Strongly recommended.

Pimoroni Black Friday week

Of course Black Friday is a bit of a racket. But there are some bargains to be had. Pimoroni are making a week of it. Today they’ve reduced all their Breakout Garden sensors. These are very well packaged and you can either solder to them or plug them into their “Breakout Garden”. which attaches to the top of a Raspberry Pi. They have a nicely managed set of libraries on GitHub which make it very easy to get to grips with the devices and the range of sensors you can get is very wide. There are also some nifty little displays and lights too. And the individual devices are pocket money prices. And a lot of them are around a third off at the moment.

They are great fun for playing with. I’ve just saved a fortune by buying a whole bunch.

In search of a backslash

A few years ago, at an MVP Summit, I bought a keyboard from the Microsoft Store. The discount was very pleasing and the keyboard was very comfortable. I thought this made me a winner.

However, it did come with a bit of a sting in the tail, in that had the american layout, what with being sold in America. I set the Windows 10 language to match, but then I found that my pesky muscle memory was causing me to type the wrong keys every now and then. So I found a halfway house solution, using the american keyboard with the PC set to the UK layout. As long as I rely on my muscles and not my eyes to decide which key to press, it works very well. Except for the backslash key. That doesn’t seem to exist anywhere that I can find. I have workarounds, I’ve been known to search for the word “backslash” and then copy the required character from the resulting display. I can also open PowerShell and copy the character from there (you can see that I’ve given this some thought)

Anyhoo, I’m doing some C development at the moment where I seem to need the backslash key quite a lot, and so I’ve decided to ditch my american keyboard and go back to my slightly less comfy one which has the UK layout. It occurs to me that the twenty quid or so that I saved by buying a non UK keyboard has been well and truly earned. Perhaps there’s a lesson here about false economy, but I’m far to old to learn something like that…..

Password management is a thing

When I was younger, more innocent and the internet was a friendly place (remember netiquette?) I thought that picking an out of the way phrase and using it for my passwords was a good idea. Then, a few years later, I realised that this was in fact a silly idea and started using different passwords for all my accounts. Which is just as well.

Earlier this week I received an email with my venerable old password phrase as the message subject and containing a link to a pdf document. I haven’t opened the pdf document (if that is what it is) or replied to the email. I can only assume that someone has come across my old password on a dead account, found that it doesn’t work anywhere else and is trying to use their knowledge of that one password to bounce me into revealing a few more secrets. Good luck with that.

So, I’ve checked all my passwords to make sure that none of them are harking back to the past, I’ve also signed up to a password manager and changed my important passwords into new ones, just in case.

Making QR codes from Python

I’m trying to create the game of robot rugby. As you do. I’ve no idea how the game mechanic will work. My plan is to rope in some folks at the Hardware Meetup to try and work out the rules.

Anyhoo, one of the things that we are working on is some way of tracking the robots around the playfield so that each robot player can know where it is. Brian has been working on some code to track things by means of QR codes and so I said I’d make some “rugby hats” for the robots with QR codes printed on them. So I needed to get and print some QR codes.

It turns out that making QR codes from a Python program is really, really easy. I found this library which works a treat.

import qrcode
for i in range(1,25):
    qr = qrcode.QRCode(
    version=1,
    error_correction=qrcode.constants.ERROR_CORRECT_L,
    box_size=5,
    border=4,
    )
    text="Robot"+str(i)
    qr.add_data(text)
    qr.make()
    img = qr.make_image(fill_color="black", back_color="white")
    filename = text+".png"
    img.save(filename)

This will make 24 labels that will just fill an A4 page in a word document. I printed them out onto label paper and stuck them on some pixel shades that I’d printed.

Only Connect Rocks

Only Connect is an awesome game show. Not only does it have Victoria Cohen as host (you really should read her book about how she won a million dollars playing poker) but it has some of the hardest questions out there. The teams are given things and have to figure out the connections between them.

Mind you, I might only be saying this because I got the above connection.

Begin to Code C# with Visual Studio 2019 video now available

Last week I got an email from Zefanja who was having problems using Snaps with Visual Studio 2019.

Snaps are an essential element of my “Begin to Code with C#” book, and if you can’t get them to work the book text doesn’t work very well. So I’ve made a new video that explains how to set your PC up.

I was just about to send Zefanja a message about this when he has got in touch saying that he has fixed his problem. Anyhoo, if anyone else is using Snaps with Visual Studio 2019 they might find this useful.

Update: Carlos got in touch telling me that the audio was a bit quiet. It was. Something to do with a setting on my little mixer being too low. So I’ve made a new louder version - effectively I’ve turned everything up to 11 for this one. The link above is to the louder one. If you prefer the quieter original you can find it here.

Very expensive lego bricks

Years ago I made a picture using Lego bricks. They had this service where you could send them an image and they would send you back the bricks to make a 44x44 version on a Lego back plate. Turns out that I was way ahead of my time, in that there are now lots of apps for phones and whatnot that will do this for you.

In fact I was so far ahead of my time that some of the bricks changed have faded and changed colour. Which is rather sad. I wondered about replacing them, and so I went on to the Lego site where they sell individual bricks and started pricing up replacements. Each tiny brick is 6 pence and I need quite a lot of the, nearly sixty pound’s worth.

I’m now learning to appreciate the “retro charm” of the faded colour scheme.