HullOS-Z now available

Some software you release. Other stuff just seems to escape… HullOS-Z has now escaped onto GitHub. It’s the next version of the Connected Little Boxes software and the Hull Pixelbot controller, rolled into one enticing bunch and dropped onto the Raspberry Pi PICO W. Other versions will be coming along soon.

It’s definitely a work in progress and the initial focus is getting something to work with Robot Rugby. It is also the first step in integrating PythonIsh (and another surprise language) with Connected Little Boxes.

You are welcome to have a play with it and let me know what you think. In fact I’d love that. The repository has a uf2 file you can drop onto a Pico W or you can build the whole thing yourself using Platform IO.

Happy Hardware Birthday

All contributions gratefully recieved

Had a great birthday today. Got a new money box I can use to save up for cameras (and film), along with chocolate goodies, a camera bag and a book about experimental photography. Then it was time for the hardware meetup. I took cake. It seemed the right thing to do.

In the spirit of novel musical instruments, Ian brought along this amazing wind powered keyboard.

We had a good group of folks turned up. All the cake was eaten and the conversation was as wide-ranging as ever. Ross had brought along his “awesome keyboard controller” and it was, er, awesome (so good I forgot to take pictures). We also had the next iteration of rugby playing robots.

These are the robots in the arena

Ben was coding the robot movement and Brian had some software running for tracking them.

You can see the blue markers on the tops of the robots showing they are being tracked.

The next step is to send position information to the robots so that the code in them can work out which way to go. We should be doing that at the next meetup in a couple of weeks.

Comedy script idea

Scene: A single performer on the stage, sitting at a large bench with a magnifying class and assorted small tools. The performer speaks:

“And now we move on to the Casio CA-500WE-1AEF which combines an 8 digit calculator with timekeeping functions. It uses a single CR2016 lithium coin cell which we can access by removing four 1mm screws found in the back of the case…”

The camera pulls back to reveal an audience of spectators staring earnestly at the performer. The camera continues to move backwards away from the stage, backwards through a corridor, into the foyer and then out through the front doors of the theatre onto the street where it lights on a sign that says…..

“Watch batteries replaced”

Heading home via the Science Museum

..as described in the blog

Last year we followed our trip to Hyper Japan with the Formula E finals. This year the timings are different, so we settled for a trip to one of my favourite places in the world, the Science Museum. They’ve added a few bits since we last visited. There’s a great section about you as a person and a machine, and another about energy. They’ve still got the displays of stuff from the past, which is being updated and now contains a disconcerting amount of stuff that I remember….

When does a “new” sticker stop being a thing?

Right hand drive…

Thanks to my recent outing I was able to describe in excruciating detail what all the various bits do.

The start of somethiung big…

My favourite machine of the day. A single cable goes up and down around 10 pulleys which are slightly off centre and rotate at different speeds to simulate the effect of various celestial bodies (sun, moon, planets etc) on the earth. The cable ends up being connected to a pen that draws a line on paper drawn through the machine from one spool to the other. In other words, you turn the handle on the right and the machine displays future tide levels.

Then we got on our train back to Hull and were treated to exactly the same experience going home as we had getting to London. This time they added more excitement with live arrival data for both our train and our connecting one. They also added more jeopardy, with hardly any trains going to Hull later that evening. Would be we stuck in Doncaster? Fortunately, again, both trains were late, but in a good way for us. Why didn’t we just catch a train that that straight from Hull to London you ask? Well, last time I did that the train wasn’t late. It just wasn’t there. I think I’m reaching the point where train travel is just too exciting for me. Anyhoo, it has been a great couple of days.

"The Comedy about Spies" is superb

We knew exactly what was going to happen when someone shouted “Raise the alarm!”. But it was still funny. That’s a huge tribute to writing, performing and set design. It takes a lot of work to be that silly, that quickly. Not all the lines were that good/bad. But there were so many of them, they came so fast and they were performed with such conviction that the packed audience, including us, were swept along. We got running gags, set pieces, impressive staging and good ice-cream. And they even found time for an engaging story with some poignant endings.

We were at “The Comedy about Spies”, part of our mini-mini-break to London. The very first element of the break was an exciting edge of the seat experience provided by the British Rail transport network which, by the simple expedient of making one train late, added a lot of excitement to what should have been a routine journey. “Would we arrive in time to see our next train leaving the station?”. Who knew? Certainly not anyone in charge of the network. As it turned out the train we were meeting was also late and, in a magical plot twist, not even the train we were expecting so our seat reservations didn’t work. Ho hum.

Anyhoo, we got to London, had a walk around and then headed to the play. It was really good. I take my stupidity very seriously and this stuff was done very well indeed. Strongly recommended.

Pro tip: The seats that we had (Row U in the stalls) where somewhat cheaper because of their “limited view”. This didn’t reduce our enjoyment (they had a video screen showing the bits we couldn’t see). If you want to reduce the price of your great night out you should go for them.

C Code Connundrum

if (tokenOffset + 1 >= MAX_TOKEN_LENGTH)

I’m writing some text decoding stuff at the moment. The piece of code above is a bit of C that I’ve written to make sure than I don’t write over the end of my token array. If the tokenOffset gets larger then the length of the array the condition is true and I will stop writing into it. One of the joys of C is that you have to worry about this kind of thing, otherwise you can overwrite memory and have all kinds of bad things happen. However, the code above is not as efficient as it might be. Any ideas why?

…sound of crickets….

Well, every time the code runs it will have to work out tokenOffset+1, because tokenOffset is a variable. However, look what happens if I do this:

if (tokenOffset >= MAX_TOKEN_LENGTH-1)

The logic is the same, but now I’m subtracting the value 1 from MAX_TOKEN_LENGTH, which is a constant containing the length of the buffer. Since this is fixed at compile time the compiler will just drop the reduced value into the code, so the program now performs no calculations when the test is made. This is the kind of thing that you used to have to fret about, back in the day when every processor cycle was precious. Such fun.

Incidentally, you might be wondering why I have one less character in my text buffer than I think. This is because in C a character string array contains a null character (a character with the code of 0) which marks the end of the string. This character has the lovely name of “terminator”. This does mean that a 50 character array can only actually hold 49 characters, because the last one is the terminator. Another way to solve this problem is to make the array one bigger when you create it, to leave room for Arnold.

PythonIsh now running on Connected Little Boxes

I’ve just spent the day playing with PythonIsh. It’s a tiny language that I’m adding to my Connected Little Boxes. It originated in the Hull Pixelbot, but now I want use it to make it easy to program all my different devices. Today it actually worked properly for the first time, which is nice.

The idea is that you can write tiny bits of code that run in response to events on devices. You can save program files in the device and one program can load in another. You can also enter a new program while an existing one is running. And, as you can see above, the device can host a website where you can enter code. You can also edit code online and send it to a device over MQTT.

It will be out soon on GitHub.

Tip Tripping

They have barges down on the river

Went to the rubbish tip. An affair of badly chosen (massive roadworks) and implemented (turned wrong way) routing. But the tip is in a nice place, down by the river at the far side of a bridge not operated by a troll. Or at least I couldn’t see one.

Non-troll operated bridge

The tip is self-service, lots of labelled bins waiting for their particular type of rubbish. I really hope that they don’t tip all the bins into one big skip at the end of the day.

I’d taken the pass you are supposed to show when you want to throw things away but nobody asked me for it. Maybe next time. Looking at what’s in the garage, there will be a next time….

Shopping for 12 year old me

I love the list of people the magic brain is ideal for….

I got the two items above in Scarborough last week. They are the kind of things that 12 year old me would really have liked. The marked deck lets you work out what card your victims are holding by decoding tiny icons on the back. A stripper deck is one which has been filed down on the sides. The width at the top of each card is slightly different from the width at the bottom. If you put the chosen card in the deck upside down you can easily find it because it sticks out. You slide your fingers up the sides of the deck you can “strip” the inverted card out and look quite magical.

I actually did get a “Magic Brain” calculator when I was 12 and used it to sum up survey results. You add, subtract and multiply (but not divide) by using a metal stylus to move the vertical sliders up and down, changing the numbers displayed in the windows. If adding the value to the one displayed causes a carry you slide the value down and then loop around at the bottom to add the carry. For subtraction you dialled in one number, and then slid the numbers back up to subtract. It didn’t handle negative numbers very well….

Slightly older me thinks both these things are really rather wonderful. Scarborough has lots of little shops selling things like these for knock down prices. My magic brain only cost me a pound and the playing cards weren’t much more. Great fun.

Live Aid at 40

I didn’t get to see much of Live Aid back in 1985. I was working in Paris for a couple of weeks, teaching American students how to program the BBC Micro. Skills which I’m sure they found useful when they got back to the ‘states. The flat I was staying in didn’t have a telly, so I only saw bits and bobs in bars and whatnot when we went out. We watched some of the concert last night, when the BBC reprised the show. I really enjoyed it. Random observations:

  • Leather trousers were big in 1985, which must have been lovely in the heat of Wembley stadium in July.

  • It was interesting to watch the camera operators waving around enormous broadcast cameras to get close ups of the performers. This must have been quite ground (and back) breaking for the time.

  • Apparently Queen spent three days honing their 16 minute set. It really showed. Freddy Mercury was a genius.

  • You could pay your donations in a Giro bank account at you local post office. Imagine that.

  • They had the famous actor (and Hull University Honorary Doctor - I was at the ceremony) John Hurt on and asked him his favourite band. He gave a very diplomatic answer which was fortuitously (for him) cut short by the next band starting up. America had Jack Nicholson. And Bette Midler.

  • Nobody in the crowd was holding up a phone to record the show. I wonder why that was?

Retro Hi-Fi Fun

..plus some contemporary media…

In these hot summer days it is important to stay cool, keep hydrated and avoid making any rash purchases of vintage Hi-Fi systems…..

Oh well. In my defence I saw it a shop window for sale at a lovely low price and it works a treat. The tape deck doesn’t have Dolby but it sounds fine and the CD player has room for 5 CDs. It’s going in my office so that I can avoid hearing tracks that magically change to different versions, pause for no good reason and suddenly come from someone else’s favourites. .

Robot Rugby - now with added ball

We need to slow the ball down, it kept rolling into the same corner.

Just a quiet Hardware Meetup this evening. Probably because I forgot to send out the email telling people about it….

Oh well, sorry folks. The next one will be in two weeks on the 23rd July. I’ll make sure to give you plenty of notice. Simon came along with kit of parts to make a remote controlled ice-cream jingle machine, along with a beautifully made clock driver box. I’d brought 4 robots and a couple of golden balls that we are going to use for robot rugby. I got all the robots working and programmable from the internet. It turns out that my phone makes a very workable WiFi connection.

Next time we’ll hopefully have some tracking action too.

Go See Pride and Prejudice in Scarborough

As everybode kno I consider myself a very cultured person. I’ve watched most of the Marvel movies and I know the numbers and pilots of all the Thunderbird craft. Last night I went to the theatre to further burnish my cultural credentials. We saw Pride and Prejudice at the Stephen Joseph Theatre in Scarborough.

I did a bit of due diligence before we set out and, after discovering that the story does not include any aliens, car chases, superheroes or “14 minutes to save the earth” moments, I took the precaution of ordering beer and ice-cream for the interval. At least that way I would have something to look forward to during the evening.

As it turned out I needn’t have bothered (although the beer and ice-cream was very nice). The play was awesome. The production was enthusiastically acted and imaginatively staged. The best thing about the way it was done is that it was definitely not the “Lizzy and Darcy Show”.(showing knowledge of the actual plot - go me).

All of the accompanying characters were very well rounded out and you got an understanding of how difficult it was to make your way through those times if you had made the mistake of being born without any money to your name. Lots of great lines from the book made it onto the stage, and the casting was inspired, including a few of the actors “doubling up” on characters which worked incredibly well.

If you think that classic literature, or plays aren’t your thing you really should go along to see the play and have your mind changed. It won’t cost you much more than going to see the latest superhero reboot (which will be on telly soon anyway) and you can order beer and ice-cream for half time. Win win.

More Naval Battles at Scarborough

Coming under heavy bombardment..

A while back I wrote about the Naval Battles that they stage at Peasholm Park in Scarborough. We went back there today and I took some more pictures. Fun fact, the camera I used this time was actually older than the one I used in 2009…

The bad guys get their cumuppance

Aircraft carrier

Sending in air support

The boats have people in them steering.

If you get the chance you should go along. The battles take place every Monday, Thursday and Saturday at 3:00pm and are preceded by a musical performance. It’s great fun and you can buy ice creams. And wine. Find out more here.