Super Duper Hardware Meetup

We had a really good hardware meetup today at c4di. A whole bunch of new members turned up. along with a bunch of "regulars".

I did a talk about the latest developments on the Hull Pixelbot front. The system that controls the Hull Pixelbot has been renamed "HullOS" for marketing reasons, and is now available on GitHub. There's also a manual for the new scripting language supported by HullOS and an editor program you can use to create HullOS scripts and load them into the robot. 

Finally, I've added the DXF files for laser cutting Hull Pixelbot chassis components, along with STL files for the 3D printed parts that you need as well.

I'll be adding more Hull Pixelbot stuff in blog posts over the next few weeks. 

There were lots of really interesting conversations going on all round the room, which was great. We've still got room for more though, the next meetup is on the 15th of February. You can sign up here

Bank with Monzo

I'm not sure if Monzo is the "bank of the future". But I am sure that it provides a bunch of features that people are going to want in their future banks. Once you've used it for a while you start to think "Why can all banks be like this?".

Banks and their mobile phone apps have been getting steadily better over the years. We can now send money instantly and check our balances. But the balances always tend to lag between "real life" as payments and credits take their time to meander through the banking system. Monzo isn't like that. Within seconds of paying for something with my Monzo card my watch goes buzz and tells me how much I've spent.

The app keeps track of how much I've spent each day, and it knows the retailers I use, their location and the kinds of things they sell. So I can see how much I spend on coffee, petrol and groceries and do (or at least attempt to do) sensible budget type things. 

The customer support is excellent and registering for an account was a snap (quite literally - as you have to record a 5 second video of yourself asking for an account as part of the process).

To add a bit of icing to the already nice cake, it turns out that you can use your Monzo card abroad without paying any of those nasty commissions that other card companies like add on top. It's actually based on Master Card technology, which means that it should work most everywhere.

At the moment you could't really call Monzo a "proper bank account". It's missing a few features that make it a bit hard to use as the only place you put your money. I'm using it by transferring lumps of cash from my main account into Monzo, and then using the Monzo card to spend it. This works very well though, the transactions go through very quickly, so tracking how much cash you left is very easy. 

Monzo have big ambitions to challenge the high street banks, and they are adding features on a regular basis. What they're offering is a big step forward on what is currently offered by everyone else, I just hope they can find a business model that allows them to fund what they are delivering on a long term basis. Speaking personally, I'd be happy to pay a subscription to them just for the improved budgeting tools. I'm sure that all the other banks are looking very carefully at what Monzo are doing, and taking notes.  Banking just got interesting.

You can sign up for a Monzo card here, although there is a bit of a waiting list. Existing account holders are occasionally sent "Golden Tickets" which they can pass on to their chums to get them on the system, so if you fancy having a go, just find someone with a bright pink card, and ask them for an invite. 

Hull Pixelbots at Global Gamejam

The them of the Global Gamejam was "transmission". Over in the university we had a bunch of teams exploring different aspects of this in lots of creative ways. 

I had a bunch of Hull Pixelbots and a newly minted web editor that mostly worked. 

Above you can see a nearly working display of Hull Pixelbots propagating a transmission from one to the other. Each robot is programmed via a web site using a scripting language that runs inside the robot. 

The idea is that each robot "wakes up" the next one by moving close to it. The first attempt fails because the Mr White doesn't wake up Crystal Maisie,, and the second attempt shows my bad planning, in that it leaves Crystal Maisie in the way of the final move from The See Through Kid. Oh well. 

Hopefully players of the completed game will be better at it than I was.  I think it would be interesting for a large team, with each team member controlling a robot and a prize for the fastest transition from one end to the other, using all the robots at their assigned starting positions. I took some pictures during the judging, you can find all of the shots here

Thanks to Simon and David from the university for organising such a great event. 

Hull Raspberry Pi Jam and Hull Pixelbots

Sorry the image above is a bit blurry. My lovely Fuji camera takes fantastic pictures, but only if you're patient enough to let it finish focusing before you take the shot.

Anyhoo, We had great fun at the Raspberry Pi Jam in the Central Library in Hull today. I've written before about how any carefully designed user interface never survives contact with the user. Same happened to day when I turned some kids lose writing little programs to control robots. 

The good news is that making robots do what you tell them was sufficiently intriguing for folks to ride over issues with the interface, and everyone had great fun in the end. I left the event determined to get enough robots together to allow people to do some proper co-operative (or competitive) action.  And set up something rather interesting. 

Then it was on to the Global Gamejam event at the university. The theme of the competition is "Transmission". I've got a plan for that. Involving robots. 

Feeling better - but going backwards

I think I must be feeling a bit better, because I've started making stupid mistakes again. Starting with telling off the database for refusing to find something that I knew was there. After all, I'd put the record there, hadn't I? Turns out that I had. Twice. So my request to find a single item with a particular name was failing because there were two of them.

After a bit of tidying up I've got something mostly presentable. I want to use it tomorrow at the Raspberry Pi Jam in Hull, and also as the basis of a Global GameJam entry. 

Coding while ill

Not well today. Let's just say that there's a particular room in the house that I can't be too far away from just at the moment. And I've got a horrible sore throat. What better time to write code? After all, the day can't get any worse, can it?

For some time I've been meaning to write a web programming interface for the Hull Pixelbots. I want to use MVC Active Server Pages and host the project on Azure. And today I got started on the project. I've not done this kind of thing for a while, and it was a journey of discovery in many ways. There's a very good tutorial on how to do it here

By the end of the day I've got the basics working, and I'm feeling a lot better. I think coding while ill works well for me.

Fibbage is Fun

We spent some time last night playing Fibbage. I first played it earlier in the year at David's. It's so good I actually bought a copy. It's a great party game. You need a PC, preferably with a big screen, and each player needs a device with web access. Then the game invites players to invent answers to silly questions and search for the correct one. 

And  no, I'm not saying it's good just because I won. Although I did. Perhaps those years of being a lecturer have turned me into someone good at inventing plausible lies....

Show your work to people

I've spent a chunk of today improving the Hull Pixelbot software. The improvements were identified when I was showing off the software at the hardware group last week. There's nothing like showing off your stuff to flag up faults and issues in it. Things that seemed like carefully thought out design decisions turn out the be horrible ways of doing things. And if you're lucky the person you're trying to impress will come up with ideas and suggestions that will make what you've building even better.

Perhaps you might be a bit afraid of doing this, but in my experience it makes a huge difference to the quality of a product to have someone take a look who hasn't spent ages living with it. 

An MP3 player for 88 pence

I remember when mp3 players first came out. They weren't cheap. Now they are 88 pence. Brian showed me one at the Hardware Group on Thursday.

Going to the group is always a calculated risk for me, in that people frequently show me things that I want to buy one of. Mind you, at 88 pence each I can afford to go mad and order a number, so I've bought 5. 

They can be controlled by an Arduino (or any other device with digital I/O) or directly. You'll need a micro-sd card to hold the music and a speaker of some kind of course, but I'm thinking of using them to make an orchestra of Hull Pixelbots.....

Hull Pixelbot and Meltdown and Spectre

There's been a lot of talk in the press about the Meltdown and Spectre vulnerabilities inherent in modern computer systems. For anyone out there who is concerned, I can confirm that there is no danger of any Hull Pixelbots being compromised by either of these issues.  

Actually, to be serious for a moment, the important thing about these two clever pieces of nastiness is that they let a naughty program read another part of your computer memory. They don't directly allow a program to attack your system.

If you happen to be running a missile control password management database at the same time as browsing the murkier corners of the internet and running a cracked copy of Photoshop then you might have cause to worry, but most people don't do this. At least, I really hope they don't.

One of "Robert's Rules" is "A system complicated to be useful will have bugs in it". A corollary (posh word) is  "A system complicated enough to be useful will be vulnerable to attack". 

That's why we wash our hands before eating, have locks on our houses and make sure that our computer has the most up to date security patches. 

Closing rings - a New Year Resolution

In the great spirit of "Fail early, fail often" I actually managed to break my New Year's Resolution on January the first. This was almost intentional, having crashed and burned so early in the process kind of takes the pressure off any future attempts. 

Anyhoo, the resolution was to at least complete my "activity ring" on the Apple fitness app each day. Like you can see I did last year at the end of December.

Closing this particular ring (there are three as you can see on the left) calls for a mere 30 minutes of moving about a bit. Spending an entire day on the sofa watching telly doesn't seem to fit well with this, hence the failure. 

But since then I've been a lot more busy. The latest version of the Apple watch software has a "fitness coach" mode which passes comment on your efforts and tries to exhort you to achieve more. I know that actually what is happening is something along the lines of:

if (exerciseTime < 30)
{
    print("Get off the sofa and do something you lazy person");
}

..but it does seem to be working. I've become quite fastidious about filling in the fitness ring and even hopping onto the rowing machine to top up any missing minutes towards the end of the day. Maybe I'll manage to fill in the others (energy consumption and standing up during the day) over time. 

I'm not sure that this will enable me to live longer, but I do find that with a bit of exercise my razor sharp mind is just a bit razor sharper. 

"In-band" error signalling is dangerous

I've been working on the Hull Pixelbot for what seems like ages (You probably think I've been blogging about it for roughly as long. Don't care. My blog.)

Anyhoo, today I learned the perils of "in band error signalling". The phrase "In-band" is a radio term. It means that control information is sent in the came channel as the data. My "in-band" errors worked like this:

int findVariablePos (char * name)
{
    int result;
     /* Stuff happens in here to find the variable  */
    return result; // return the offset of the variable */
}

The function findVariablePos returns the offset into the variable name table of the variable with the given name. In a program a variable is a named location that you can use to store data that is used as the program runs. If my program does this:

i = 99

- this is an attempt to store 99 in a variable called 'i' for no readily apparent reason. The thing running the program needs to have a way of finding out where in the computer the variable i is actually stored. That's the job of findVariablePos. Deep inside the program that actually runs the Hull Pixelbot script there is a statement like this:

int iPos = findVariablePos ("i")

The statement above (we're writing C by the way) would get me the position in the variable table of the variable with the name 'i'. "Aha", you say. "What if the program doesn't contain a variable called 'i'. ". Well, in that case the findVariablePos function returns the value -1 to indicate that the name was not found. This is kind of sensible, because you can't have anything at the position -1 in a table, negative numbers are meaningless in this context. All good. To make things clearer I even did this:

#define VARIABLE_NOT_FOUND -1

This gives meaning to the value, so that I can write tests that make sense:

if (iPOS==VARIABLE_NOT_FOUND)
{
    Serial.println("Variable not found");
}

All good. Works fine. Then I re-factor the code and add a bunch of new error codes. I then decide it would be nice to have a set of numbers that the user (and other programs) can use to make sense of error messages. And I make the following change:

#define VARIABLE_NOT_FOUND 2

This makes sense in the context of fiddling with my error numbers, but it means that if the program ever puts a variable in location 2 in the variable table, the program will completely fail to find it because every time it gets the offset value this will be regarded as meaning that no variable was found. 

Which is of course what happened. The problem in caused by a bad design decision (using the data value as a means of signalling errors) and then doing something without considering the consequences. The latest version of findVariablePos looks like this:

int findVariablePos (char * name, int * position)
{
    int result;
     /* Stuff happens in here to find the variable  */
    
    *position = result;
    return FOUND_OK;
}

The result of the call is returned via one channel (the result of function) and the position value is returned by the method setting the value of the second parameter, which is a pointer to the variable. The call is a bit more complicated:

int iPos;
if (findVariablePos ("i",  &iPos) == FOUND_OK)
{
    Serial.println("Found the variable");
}

However, it now doesn't matter what the error numbers are, and whether or not they clash with any valid variable positions. 

"In-band" error handling is great if your'e in a hurry and you're trying to keep the code simple and quick. But they also leave you open to problems further down the tracks.